From: Mukesh Ojha <mojha@codeaurora.org>
To: Yue Haibing <yuehaibing@huawei.com>,
davem@davemloft.net, benh@kernel.crashing.org, paulus@samba.org,
mpe@ellerman.id.au, tlfalcon@linux.ibm.com, jallen@linux.ibm.com
Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] ibmvnic: remove set but not used variable 'netdev'
Date: Wed, 3 Apr 2019 14:36:53 +0530 [thread overview]
Message-ID: <1fda3007-ace5-a3fc-4a1d-22120fec6717@codeaurora.org> (raw)
In-Reply-To: <20190403075409.29384-1-yuehaibing@huawei.com>
On 4/3/2019 1:24 PM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/ibm/ibmvnic.c: In function '__ibmvnic_reset':
> drivers/net/ethernet/ibm/ibmvnic.c:1971:21: warning: variable 'netdev' set but not used [-Wunused-but-set-variable]
>
> It's never used since introduction in
> commit ed651a10875f ("ibmvnic: Updated reset handling")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Cheers,
-Mukesh
> ---
> drivers/net/ethernet/ibm/ibmvnic.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
> index 25b8e04..20c4e08 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -1968,13 +1968,11 @@ static void __ibmvnic_reset(struct work_struct *work)
> {
> struct ibmvnic_rwi *rwi;
> struct ibmvnic_adapter *adapter;
> - struct net_device *netdev;
> bool we_lock_rtnl = false;
> u32 reset_state;
> int rc = 0;
>
> adapter = container_of(work, struct ibmvnic_adapter, ibmvnic_reset);
> - netdev = adapter->netdev;
>
> /* netif_set_real_num_xx_queues needs to take rtnl lock here
> * unless wait_for_reset is set, in which case the rtnl lock
next prev parent reply other threads:[~2019-04-03 9:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 7:54 [PATCH -next] ibmvnic: remove set but not used variable 'netdev' Yue Haibing
2019-04-03 9:06 ` Mukesh Ojha [this message]
2019-04-05 0:37 ` David Miller
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=1fda3007-ace5-a3fc-4a1d-22120fec6717@codeaurora.org \
--to=mojha@codeaurora.org \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=jallen@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
--cc=tlfalcon@linux.ibm.com \
--cc=yuehaibing@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;
as well as URLs for NNTP newsgroup(s).