diff mbox series

neighbour: Remove redundant initialization of 'bucket'

Message ID 1620468185-122101-1-git-send-email-yang.lee@linux.alibaba.com (mailing list archive)
State Accepted
Commit 48de7c0c1c9225b478c602184be8e00b92b35c61
Delegated to: Netdev Maintainers
Headers show
Series neighbour: Remove redundant initialization of 'bucket' | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 7 maintainers not CCed: dsahern@kernel.org jdike@akamai.com chinagar@codeaurora.org trix@redhat.com roopa@cumulusnetworks.com liuhangbin@gmail.com weichen.chen@linux.alibaba.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 3 this patch: 3
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 3 this patch: 3
netdev/header_inline success Link

Commit Message

Yang Li May 8, 2021, 10:03 a.m. UTC
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@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 net/core/neighbour.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 10, 2021, 9:30 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Sat,  8 May 2021 18:03:05 +0800 you wrote:
> 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]
> 
> [...]

Here is the summary with links:
  - neighbour: Remove redundant initialization of 'bucket'
    https://git.kernel.org/netdev/net-next/c/48de7c0c1c92

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

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++) {