summaryrefslogtreecommitdiff
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2020-10-31 19:14:17 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-02 16:04:34 -0800
commita344a1e8532586b4e3ad742c7fd139cdce56a767 (patch)
treeb8cd3066cb16003f88b7ff2223c464eefbb5fb32 /drivers/net/wan
parent8ed7ec1386b646130d80d017ecd4716f866ea570 (diff)
drivers: net: wan: lmc: Fix W=1 set but used variable warnings
drivers/net/wan/lmc/lmc_main.c: In function ‘lmc_ioctl’: drivers/net/wan/lmc/lmc_main.c:356:25: warning: variable ‘mii’ set but not used [-Wunused-but-set-variable] 356 | u16 mii; | ^~~ drivers/net/wan/lmc/lmc_main.c:427:25: warning: variable ‘mii’ set but not used [-Wunused-but-set-variable] 427 | u16 mii; | ^~~ drivers/net/wan/lmc/lmc_main.c: In function ‘lmc_interrupt’: drivers/net/wan/lmc/lmc_main.c:1188:9: warning: variable ‘firstcsr’ set but not used [-Wunused-but-set-variable] 1188 | u32 firstcsr; This file has funky indentation, and makes little use of tabs. Keep with this style in the patch, but that makes checkpatch unhappy. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20201031181417.1081511-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/lmc/lmc_main.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 36600b0a0ab0..93c7e8502845 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -353,9 +353,8 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
switch(xc.command){
case lmc_xilinx_reset: /*fold02*/
{
- u16 mii;
spin_lock_irqsave(&sc->lmc_lock, flags);
- mii = lmc_mii_readreg (sc, 0, 16);
+ lmc_mii_readreg (sc, 0, 16);
/*
* Make all of them 0 and make input
@@ -424,10 +423,9 @@ int lmc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
break;
case lmc_xilinx_load_prom: /*fold02*/
{
- u16 mii;
int timeout = 500000;
spin_lock_irqsave(&sc->lmc_lock, flags);
- mii = lmc_mii_readreg (sc, 0, 16);
+ lmc_mii_readreg (sc, 0, 16);
/*
* Make all of them 0 and make input
@@ -1185,7 +1183,6 @@ static irqreturn_t lmc_interrupt (int irq, void *dev_instance) /*fold00*/
int i;
s32 stat;
unsigned int badtx;
- u32 firstcsr;
int max_work = LMC_RXDESCS;
int handled = 0;
@@ -1203,8 +1200,6 @@ static irqreturn_t lmc_interrupt (int irq, void *dev_instance) /*fold00*/
goto lmc_int_fail_out;
}
- firstcsr = csr;
-
/* always go through this loop at least once */
while (csr & sc->lmc_intrmask) {
handled = 1;