Home
last modified time | relevance | path

Searched hist:ed0e658c (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/drivers/net/ethernet/hisilicon/hns3/hns3vf/
H A Dhclgevf_main.ced0e658c Mon Nov 29 08:00:18 CST 2021 Jiaran Zhang <zhangjiaran@huawei.com> net: hns3: refactor reset_prepare_general retry statement

Currently, the hclge_reset_prepare_general function uses the goto
statement to jump upwards, which increases code complexity and makes
the program structure difficult to understand. In addition, if
reset_pending is set, retry_cnt cannot be increased. This may result
in a failure to exit the retry or increase the number of retries.

Use the while statement instead to make the program easier to understand
and solve the problem that the goto statement cannot be exited.

Signed-off-by: Jiaran Zhang <zhangjiaran@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

/openbmc/linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/
H A Dhclge_main.ced0e658c Mon Nov 29 08:00:18 CST 2021 Jiaran Zhang <zhangjiaran@huawei.com> net: hns3: refactor reset_prepare_general retry statement

Currently, the hclge_reset_prepare_general function uses the goto
statement to jump upwards, which increases code complexity and makes
the program structure difficult to understand. In addition, if
reset_pending is set, retry_cnt cannot be increased. This may result
in a failure to exit the retry or increase the number of retries.

Use the while statement instead to make the program easier to understand
and solve the problem that the goto statement cannot be exited.

Signed-off-by: Jiaran Zhang <zhangjiaran@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>