Skip to contentSkip to conversation

net: netrom: nr_in: Remove redundant assignment to ns

PATCH Applied Jiapeng Chong 2 participants 2 messages Apr 28, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: netrom: nr_in: Remove redundant assignment to ns

Variable ns is set to 'skb->data[17]' but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed.

Cleans up the following clang-analyzer warning:

net/netrom/nr_in.c:156:2: warning: Value stored to 'ns' is never read [clang-analyzer-deadcode.DeadStores].

---
 net/netrom/nr_in.c | 1 -
 1 file changed, 1 deletion(-)
net/netrom/nr_in.c +0 -1
index 69e5890..2f084b6 100644
@@ -153,7 +153,6 @@ static int nr_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype
 	int queued = 0;
 
 	nr = skb->data[18];
-	ns = skb->data[17];
 
 	switch (frametype) {
 	case NR_CONNREQ:
Signature · 1 line
1.8.3.1
#1 lore raw
This patch was applied to netdev/net-next.git (refs/heads/master):

Hello:

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

Quoted 10 lines · On Wed, 28 Apr 2021 17:58:05 +0800 you wrote:

Variable ns is set to 'skb->data[17]' but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed.

Cleans up the following clang-analyzer warning:

net/netrom/nr_in.c:156:2: warning: Value stored to 'ns' is never read [clang-analyzer-deadcode.DeadStores].

[...]

Here is the summary with links:
- net: netrom: nr_in: Remove redundant assignment to ns

    https://git.kernel.org/netdev/net-next/c/15c0a64bfcbc

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