All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: netrom: nr_in: Remove redundant assignment to ns
@ 2021-04-28  9:58 Jiapeng Chong
  2021-04-28 21:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-04-28  9:58 UTC (permalink / raw)
  To: ralf; +Cc: davem, kuba, linux-hams, netdev, linux-kernel, Jiapeng Chong

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].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 net/netrom/nr_in.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c
index 69e5890..2f084b6 100644
--- a/net/netrom/nr_in.c
+++ b/net/netrom/nr_in.c
@@ -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:
-- 
1.8.3.1


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

* Re: [PATCH] net: netrom: nr_in: Remove redundant assignment to ns
  2021-04-28  9:58 [PATCH] net: netrom: nr_in: Remove redundant assignment to ns Jiapeng Chong
@ 2021-04-28 21:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-28 21:10 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: ralf, davem, kuba, linux-hams, netdev, linux-kernel

Hello:

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

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



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

end of thread, other threads:[~2021-04-28 21:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28  9:58 [PATCH] net: netrom: nr_in: Remove redundant assignment to ns Jiapeng Chong
2021-04-28 21:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.