[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1620468185-122101-1-git-send-email-yang.lee@linux.alibaba.com>
Date: Sat, 8 May 2021 18:03:05 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: davem@...emloft.net
Cc: kuba@...nel.org, nathan@...nel.org, ndesaulniers@...gle.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
clang-built-linux@...glegroups.com,
Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH] neighbour: Remove redundant initialization of 'bucket'
Integer variable 'bucket' is being initialized however
this value is never read as 'bucket' is assigned zero
in for statement. Remove the redundant assignment.
Cleans up clang warning:
net/core/neighbour.c:3144:6: warning: Value stored to 'bucket' during
its initialization is never read [clang-analyzer-deadcode.DeadStores]
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
net/core/neighbour.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 98f20efb..2b2f333 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -3141,7 +3141,7 @@ static struct pneigh_entry *pneigh_get_first(struct seq_file *seq)
struct net *net = seq_file_net(seq);
struct neigh_table *tbl = state->tbl;
struct pneigh_entry *pn = NULL;
- int bucket = state->bucket;
+ int bucket;
state->flags |= NEIGH_SEQ_IS_PNEIGH;
for (bucket = 0; bucket <= PNEIGH_HASHMASK; bucket++) {
--
1.8.3.1
Powered by blists - more mailing lists