netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: socionext: remove set but not used variable 'pkts'
@ 2019-07-03  2:42 YueHaibing
  2019-07-03  5:12 ` Ilias Apalodimas
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: YueHaibing @ 2019-07-03  2:42 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>
---
 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..015d1ec5436a 100644
--- a/drivers/net/ethernet/socionext/netsec.c
+++ b/drivers/net/ethernet/socionext/netsec.c
@@ -634,7 +634,7 @@ 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;
+	unsigned int bytes;
 	struct netsec_de *entry;
 	int tail = dring->tail;
 	int cnt = 0;
@@ -642,7 +642,6 @@ static bool netsec_clean_tx_dring(struct netsec_priv *priv)
 	if (dring->is_xdp)
 		spin_lock(&dring->lock);
 
-	pkts = 0;
 	bytes = 0;
 	entry = dring->vaddr + DESC_SZ * tail;




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

end of thread, other threads:[~2019-07-05 22:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-03  2:42 [PATCH net-next] net: socionext: remove set but not used variable 'pkts' YueHaibing
2019-07-03  5:12 ` Ilias Apalodimas
2019-07-03 18:30 ` David Miller
2019-07-04  3:21 ` [PATCH v2 " YueHaibing
2019-07-04  3:37   ` [PATCH v3 " 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).