* [PATCH] net: macb: remove redundant assignment to variable work_done
@ 2017-10-31 14:23 Colin King
2017-11-01 9:08 ` Alexander Dahl
2017-11-01 12:27 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2017-10-31 14:23 UTC (permalink / raw)
To: Nicolas Ferre, netdev; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable work_done is set to zero and this value is never read, instead
it is set to another value a few statements later. Remove the redundant
assignment. Cleans up clang warning:
drivers/net/ethernet/cadence/macb_main.c:1221:2: warning: Value stored
to 'work_done' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/cadence/macb_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 6df2cad61647..5dafcde67e45 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -1218,8 +1218,6 @@ static int macb_poll(struct napi_struct *napi, int budget)
status = macb_readl(bp, RSR);
macb_writel(bp, RSR, status);
- work_done = 0;
-
netdev_vdbg(bp->dev, "poll: status = %08lx, budget = %d\n",
(unsigned long)status, budget);
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: macb: remove redundant assignment to variable work_done
2017-10-31 14:23 [PATCH] net: macb: remove redundant assignment to variable work_done Colin King
@ 2017-11-01 9:08 ` Alexander Dahl
2017-11-01 12:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Dahl @ 2017-11-01 9:08 UTC (permalink / raw)
To: Colin King; +Cc: Nicolas Ferre, netdev, kernel-janitors, linux-kernel
Hei hei,
Am Dienstag, 31. Oktober 2017, 14:23:24 CET schrieb Colin King:
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -1218,8 +1218,6 @@ static int macb_poll(struct napi_struct *napi, int
> budget) status = macb_readl(bp, RSR);
> macb_writel(bp, RSR, status);
>
> - work_done = 0;
> -
> netdev_vdbg(bp->dev, "poll: status = %08lx, budget = %d\n",
> (unsigned long)status, budget);
Looks reasonable, when looking at the surrounding code.
Applied this on top of 4.14-rc7 and tested it on an at91sam9g20 based
platform.
Tested-by: Alexander Dahl <ada@thorsis.com>
Greets
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: macb: remove redundant assignment to variable work_done
2017-10-31 14:23 [PATCH] net: macb: remove redundant assignment to variable work_done Colin King
2017-11-01 9:08 ` Alexander Dahl
@ 2017-11-01 12:27 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-11-01 12:27 UTC (permalink / raw)
To: colin.king; +Cc: nicolas.ferre, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Tue, 31 Oct 2017 14:23:24 +0000
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable work_done is set to zero and this value is never read, instead
> it is set to another value a few statements later. Remove the redundant
> assignment. Cleans up clang warning:
>
> drivers/net/ethernet/cadence/macb_main.c:1221:2: warning: Value stored
> to 'work_done' is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-01 12:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 14:23 [PATCH] net: macb: remove redundant assignment to variable work_done Colin King
2017-11-01 9:08 ` Alexander Dahl
2017-11-01 12:27 ` 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).