mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
net/mlx5: remove redundant clear_bit
When shutdown or remove callbacks are called the driver sets the flag MLX5_BREAK_FW_WAIT, to stop waiting for FW as teardown was called. There is no need to clear the bit as once shutdown or remove were called as there is no way back, the driver is going down. Furthermore, if not cleared the flag can be used also in other loops where we may wait while teardown was already called. Use test_bit() instead of test_and_clear_bit() as there is no need to clear the flag. Signed-off-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Link: https://lore.kernel.org/r/20230314054234.267365-2-saeed@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
a57cc54d69
commit
c05d145abe
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ static int wait_fw_init(struct mlx5_core_dev *dev, u32 max_wait_mili,
|
|||
if (!(fw_initializing >> 31))
|
||||
break;
|
||||
if (time_after(jiffies, end) ||
|
||||
test_and_clear_bit(MLX5_BREAK_FW_WAIT, &dev->intf_state)) {
|
||||
test_bit(MLX5_BREAK_FW_WAIT, &dev->intf_state)) {
|
||||
err = -EBUSY;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue