net/mlx5: Remove unneeded variable in mlx5_unload_one
Subsystems (3)
PATCH 1/1 net/mlx5: Remove unneeded variable in mlx5_unload_one
mlx5_unload_one do not need local variable to store different value, Hence just remove it.
--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/main.c +1 -3
@@ -1228,8 +1228,6 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, bool boot)static int mlx5_unload_one (struct mlx5_core_dev *dev,bool cleanup) { -int err =0 ; -if (cleanup) {mlx5_unregister_device (dev);mlx5_drain_health_wq (dev);
@@ -1257,7 +1255,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, bool cleanup)mlx5_function_teardown (dev, cleanup); out:mutex_unlock (&dev->intf_state_mutex); -return err; +return 0 ; }static int mlx5_mdev_init (struct mlx5_core_dev *dev,int profile_idx)
Signature · 1 line
1.7.12.4
Quoted 32 lines · zhong jiang
mlx5_unload_onedo not need local variable to store different value, Hence just remove it.Signed-off-by zhong jiang <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/main.c +0
-2@@ -1228,8 +1228,6 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, bool boot)static int mlx5_unload_one (struct mlx5_core_dev *dev,bool cleanup) { -int err =0 ; -if (cleanup) {mlx5_unregister_device (dev);drivers/net/ethernet/mellanox/mlx5/core/main.c +1
-1mlx5_drain_health_wq (dev);@@ -1257,7 +1255,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, bool cleanup)mlx5_function_teardown (dev, cleanup); out:mutex_unlock (&dev->intf_state_mutex); -return err; +return 0 ; }
Quoted 2 lines
static int mlx5_mdev_init(struct
mlx5_core_dev*dev, intprofile_idx)
David Miller
maintainerFrom: zhong jiang <[email protected]>
Date: Fri, 13 Sep 2019 00:59:02 +0800
Quoted 4 lines
mlx5_unload_onedo not need local variable to store different value, Hence just remove it.Signed-off-by zhong jiang <[email protected]>
Saeed, just take this directly via one of your trees.
Thank you.
Saeed Mahameed
AppliedQuoted 11 lines · David Miller
From: zhong jiang <[email protected]>
Date: Fri, 13 Sep 2019 00:59:02 +0800Quoted 1 line
mlx5_unload_onedo not need local variable to store differentvalue,
Quoted 3 lines
Hence just remove it.
Signed-off-by zhong jiang <[email protected]>Saeed, just take this directly via one of your trees.
Applied to net-next-mlx5.
Thanks,
Saeed.