Skip to contentSkip to conversation

drivers: net: lmc: remove redundant variable next_rx

PATCH Applied Colin King 2 participants 2 messages Jul 7, 2018

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 drivers: net: lmc: remove redundant variable next_rx

From: Colin Ian King <[email protected]>

Variable next_rx is being assigned but is never used hence it is redundant and can be removed.

Cleans up clang warning:
warning: variable 'next_rx' set but not used [-Wunused-but-set-variable]

---
 drivers/net/wan/lmc/lmc_main.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/wan/lmc/lmc_main.c +0 -2
index 90a4ad9a2d08..093bd21f574d 100644
@@ -1491,7 +1491,6 @@ static int lmc_rx(struct net_device *dev)
     lmc_softc_t *sc = dev_to_sc(dev);
     int i;
     int rx_work_limit = LMC_RXDESCS;
-    unsigned int next_rx;
     int rxIntLoopCnt;		/* debug -baz */
     int localLengthErrCnt = 0;
     long stat;
@@ -1505,7 +1504,6 @@ static int lmc_rx(struct net_device *dev)
     rxIntLoopCnt = 0;		/* debug -baz */
 
     i = sc->lmc_next_rx % LMC_RXDESCS;
-    next_rx = sc->lmc_next_rx;
 
     while (((stat = sc->lmc_rxring[i].status) & LMC_RDES_OWN_BIT) != DESC_OWNED_BY_DC21X4)
     {
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw

From: Colin King <[email protected]>
Date: Sat, 7 Jul 2018 13:47:06 +0100

Quoted 9 lines

From: Colin Ian King <[email protected]>

Variable next_rx is being assigned but is never used hence it is redundant and can be removed.

Cleans up clang warning:
warning: variable 'next_rx' set but not used [-Wunused-but-set-variable]

Applied to net-next, thanks Colin.