netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: b44: remove redundant assignment to variable reg
@ 2019-10-11 17:22 Colin King
  2019-10-15 16:58 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-10-11 17:22 UTC (permalink / raw)
  To: Michael Chan, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable reg is being assigned a value that is never read
and is being re-assigned in the following for-loop. The
assignment is redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/broadcom/b44.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index 97ab0dd25552..035dbb1b2c98 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -511,9 +511,6 @@ static void b44_stats_update(struct b44 *bp)
 		*val++ += br32(bp, reg);
 	}
 
-	/* Pad */
-	reg += 8*4UL;
-
 	for (reg = B44_RX_GOOD_O; reg <= B44_RX_NPAUSE; reg += 4UL) {
 		*val++ += br32(bp, reg);
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: b44: remove redundant assignment to variable reg
  2019-10-11 17:22 [PATCH] net: b44: remove redundant assignment to variable reg Colin King
@ 2019-10-15 16:58 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-10-15 16:58 UTC (permalink / raw)
  To: colin.king; +Cc: michael.chan, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Fri, 11 Oct 2019 18:22:32 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable reg is being assigned a value that is never read
> and is being re-assigned in the following for-loop. The
> assignment is redundant and hence can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to net-next.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-15 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 17:22 [PATCH] net: b44: remove redundant assignment to variable reg Colin King
2019-10-15 16:58 ` 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).