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>
Showing
Please register or sign in to comment