linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one
@ 2019-09-12 16:59 zhong jiang
  2019-09-13 10:06 ` Saeed Mahameed
  2019-09-15 18:53 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: zhong jiang @ 2019-09-12 16:59 UTC (permalink / raw)
  To: davem, saeedm; +Cc: netdev, linux-kernel

mlx5_unload_one do not need local variable to store different value,
Hence just remove it.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 9648c22..c39bb37 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -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)
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one
  2019-09-12 16:59 [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one zhong jiang
@ 2019-09-13 10:06 ` Saeed Mahameed
  2019-09-15 18:53 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2019-09-13 10:06 UTC (permalink / raw)
  To: zhongjiang, davem; +Cc: netdev, linux-kernel

On Fri, 2019-09-13 at 00:59 +0800, zhong jiang wrote:
> mlx5_unload_one do not need local variable to store different value,
> Hence just remove it.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> index 9648c22..c39bb37 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> @@ -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)

Acked-by: Saeed Mahameed <saeedm@mellanox.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one
  2019-09-12 16:59 [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one zhong jiang
  2019-09-13 10:06 ` Saeed Mahameed
@ 2019-09-15 18:53 ` David Miller
  2019-09-23 12:57   ` Saeed Mahameed
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2019-09-15 18:53 UTC (permalink / raw)
  To: zhongjiang; +Cc: saeedm, netdev, linux-kernel

From: zhong jiang <zhongjiang@huawei.com>
Date: Fri, 13 Sep 2019 00:59:02 +0800

> mlx5_unload_one do not need local variable to store different value,
> Hence just remove it.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Saeed, just take this directly via one of your trees.

Thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one
  2019-09-15 18:53 ` David Miller
@ 2019-09-23 12:57   ` Saeed Mahameed
  0 siblings, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2019-09-23 12:57 UTC (permalink / raw)
  To: davem, zhongjiang; +Cc: netdev, linux-kernel

On Sun, 2019-09-15 at 19:53 +0100, David Miller wrote:
> From: zhong jiang <zhongjiang@huawei.com>
> Date: Fri, 13 Sep 2019 00:59:02 +0800
> 
> > mlx5_unload_one do not need local variable to store different
> value,
> > Hence just remove it.
> > 
> > Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> 
> Saeed, just take this directly via one of your trees.
> 

Applied to net-next-mlx5.

Thanks,
Saeed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-23 12:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12 16:59 [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one zhong jiang
2019-09-13 10:06 ` Saeed Mahameed
2019-09-15 18:53 ` David Miller
2019-09-23 12:57   ` Saeed Mahameed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).