* [PATCH] bnx2: remove redundant initializations of pointers txr and rxr
@ 2018-01-23 9:44 Colin King
2018-01-23 16:17 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-01-23 9:44 UTC (permalink / raw)
To: Rasesh Mody, Harish Patil, Dept-GELinuxNICDev, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointers txr and rxr are being initialized and a few statements later
are being assigned new values without the original values ever being
read. The initialized values are therefore redundant and can be
removed.
Cleans up clang warnings:
drivers/net/ethernet/broadcom/bnx2.c:5821:28: warning: Value stored to
'txr' during its initialization is never read
drivers/net/ethernet/broadcom/bnx2.c:5822:28: warning: Value stored to
'rxr' during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/broadcom/bnx2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 154866e8517a..5de4c33f682e 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -5818,8 +5818,8 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode)
struct l2_fhdr *rx_hdr;
int ret = -ENODEV;
struct bnx2_napi *bnapi = &bp->bnx2_napi[0], *tx_napi;
- struct bnx2_tx_ring_info *txr = &bnapi->tx_ring;
- struct bnx2_rx_ring_info *rxr = &bnapi->rx_ring;
+ struct bnx2_tx_ring_info *txr;
+ struct bnx2_rx_ring_info *rxr;
tx_napi = bnapi;
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bnx2: remove redundant initializations of pointers txr and rxr
2018-01-23 9:44 [PATCH] bnx2: remove redundant initializations of pointers txr and rxr Colin King
@ 2018-01-23 16:17 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-01-23 16:17 UTC (permalink / raw)
To: colin.king
Cc: rasesh.mody, harish.patil, Dept-GELinuxNICDev, netdev,
kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Tue, 23 Jan 2018 09:44:08 +0000
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointers txr and rxr are being initialized and a few statements later
> are being assigned new values without the original values ever being
> read. The initialized values are therefore redundant and can be
> removed.
>
> Cleans up clang warnings:
> drivers/net/ethernet/broadcom/bnx2.c:5821:28: warning: Value stored to
> 'txr' during its initialization is never read
> drivers/net/ethernet/broadcom/bnx2.c:5822:28: warning: Value stored to
> 'rxr' during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied, thanks Colin.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-23 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23 9:44 [PATCH] bnx2: remove redundant initializations of pointers txr and rxr Colin King
2018-01-23 16:17 ` 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).