* [PATCH] drivers: net: lmc: remove redundant variable next_rx
@ 2018-07-07 12:47 Colin King
2018-07-07 13:07 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-07 12:47 UTC (permalink / raw)
To: David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wan/lmc/lmc_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 90a4ad9a2d08..093bd21f574d 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -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)
{
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers: net: lmc: remove redundant variable next_rx
2018-07-07 12:47 [PATCH] drivers: net: lmc: remove redundant variable next_rx Colin King
@ 2018-07-07 13:07 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-07 13:07 UTC (permalink / raw)
To: colin.king; +Cc: netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Sat, 7 Jul 2018 13:47:06 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> 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]
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied to net-next, thanks Colin.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-07 13:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-07 12:47 [PATCH] drivers: net: lmc: remove redundant variable next_rx Colin King
2018-07-07 13:07 ` 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).