netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] sfc: remove set but not used variable 'nic_data'
@ 2020-01-10  6:09 YueHaibing
  2020-01-11  7:15 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2020-01-10  6:09 UTC (permalink / raw)
  To: David S . Miller, Alex Maftei, Edward Cree, Martin Habets
  Cc: YueHaibing, netdev, linux-kernel, kernel-janitors, Hulk Robot

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/sfc/mcdi_functions.c: In function 'efx_mcdi_ev_init':
drivers/net/ethernet/sfc/mcdi_functions.c:79:28: warning:
 variable 'nic_data' set but not used [-Wunused-but-set-variable]

commit 4438b587fe4b ("sfc: move MCDI event queue management code")
introduces this unused variable.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/sfc/mcdi_functions.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/sfc/mcdi_functions.c b/drivers/net/ethernet/sfc/mcdi_functions.c
index f022e2b9e975..8cd9e0d76e85 100644
--- a/drivers/net/ethernet/sfc/mcdi_functions.c
+++ b/drivers/net/ethernet/sfc/mcdi_functions.c
@@ -76,13 +76,10 @@ int efx_mcdi_ev_init(struct efx_channel *channel, bool v1_cut_thru, bool v2)
 	MCDI_DECLARE_BUF(outbuf, MC_CMD_INIT_EVQ_V2_OUT_LEN);
 	size_t entries = channel->eventq.buf.len / EFX_BUF_SIZE;
 	struct efx_nic *efx = channel->efx;
-	struct efx_ef10_nic_data *nic_data;
 	size_t inlen, outlen;
 	dma_addr_t dma_addr;
 	int rc, i;
 
-	nic_data = efx->nic_data;
-
 	/* Fill event queue with all ones (i.e. empty events) */
 	memset(channel->eventq.buf.addr, 0xff, channel->eventq.buf.len);




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

* Re: [PATCH net-next] sfc: remove set but not used variable 'nic_data'
  2020-01-10  6:09 [PATCH net-next] sfc: remove set but not used variable 'nic_data' YueHaibing
@ 2020-01-11  7:15 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-01-11  7:15 UTC (permalink / raw)
  To: yuehaibing
  Cc: amaftei, ecree, mhabets, netdev, linux-kernel, kernel-janitors, hulkci

From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 10 Jan 2020 06:09:08 +0000

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/sfc/mcdi_functions.c: In function 'efx_mcdi_ev_init':
> drivers/net/ethernet/sfc/mcdi_functions.c:79:28: warning:
>  variable 'nic_data' set but not used [-Wunused-but-set-variable]
> 
> commit 4438b587fe4b ("sfc: move MCDI event queue management code")
> introduces this unused variable.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied.

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

end of thread, other threads:[~2020-01-11  7:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10  6:09 [PATCH net-next] sfc: remove set but not used variable 'nic_data' YueHaibing
2020-01-11  7:15 ` David Miller

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).