mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "zhongjiang@huawei.com" <zhongjiang@huawei.com>,
	"davem@davemloft.net" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/mlx5: Remove unneeded variable in mlx5_unload_one
Date: Fri, 13 Sep 2019 10:06:15 +0000	[thread overview]
Message-ID: <05f34a7c8a7ff369f9179a98eea6dad924de2d6f.camel@mellanox.com> (raw)
In-Reply-To: <1568307542-43797-1-git-send-email-zhongjiang@huawei.com>

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>

  reply	other threads:[~2019-09-13 10:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 16:59 zhong jiang
2019-09-13 10:06 ` Saeed Mahameed [this message]
2019-09-15 18:53 ` David Miller
2019-09-23 12:57   ` Saeed Mahameed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05f34a7c8a7ff369f9179a98eea6dad924de2d6f.camel@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zhongjiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®