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>
Signed-off-by: David S. Miller <davem@davemloft.net>
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;