* [PATCH v3 net-next] net: socionext: remove set but not used variable 'pkts'
[not found] <20190704032129.169282-1-yuehaibing@huawei.com>
@ 2019-07-04 3:37 ` YueHaibing
2019-07-05 22:28 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-07-04 3:37 UTC (permalink / raw)
To: Jassi Brar, Alexei Starovoitov, David S . Miller,
Ilias Apalodimas, Daniel Borkmann, Jakub Kicinski,
Jesper Dangaard Brouer
Cc: YueHaibing, netdev, xdp-newbies, bpf, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/socionext/netsec.c: In function 'netsec_clean_tx_dring':
drivers/net/ethernet/socionext/netsec.c:637:15: warning:
variable 'pkts' set but not used [-Wunused-but-set-variable]
It is not used since commit ba2b232108d3 ("net: netsec: add XDP support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
v3: remove misplaced cc in patch log
v2: keep reverse christmas-tree ordering of the local variables
---
drivers/net/ethernet/socionext/netsec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c
index 5544a722543f..d8d640b01119 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -634,15 +634,14 @@ static void netsec_set_rx_de(struct netsec_priv *priv,
static bool netsec_clean_tx_dring(struct netsec_priv *priv)
{
struct netsec_desc_ring *dring = &priv->desc_ring[NETSEC_RING_TX];
- unsigned int pkts, bytes;
struct netsec_de *entry;
int tail = dring->tail;
+ unsigned int bytes;
int cnt = 0;
if (dring->is_xdp)
spin_lock(&dring->lock);
- pkts = 0;
bytes = 0;
entry = dring->vaddr + DESC_SZ * tail;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3 net-next] net: socionext: remove set but not used variable 'pkts'
2019-07-04 3:37 ` [PATCH v3 net-next] net: socionext: remove set but not used variable 'pkts' YueHaibing
@ 2019-07-05 22:28 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-07-05 22:28 UTC (permalink / raw)
To: yuehaibing
Cc: jaswinder.singh, ast, ilias.apalodimas, daniel, jakub.kicinski,
hawk, netdev, xdp-newbies, bpf, kernel-janitors
From: YueHaibing <yuehaibing@huawei.com>
Date: Thu, 4 Jul 2019 03:37:45 +0000
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/socionext/netsec.c: In function 'netsec_clean_tx_dring':
> drivers/net/ethernet/socionext/netsec.c:637:15: warning:
> variable 'pkts' set but not used [-Wunused-but-set-variable]
>
> It is not used since commit ba2b232108d3 ("net: netsec: add XDP support")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Applied to net-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-05 22:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190704032129.169282-1-yuehaibing@huawei.com>
2019-07-04 3:37 ` [PATCH v3 net-next] net: socionext: remove set but not used variable 'pkts' YueHaibing
2019-07-05 22:28 ` 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).