* [PATCH linux-next] xfrm: Remove duplicate assignment
@ 2021-11-04 6:26 cgel.zte
2021-11-19 8:38 ` Steffen Klassert
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-11-04 6:26 UTC (permalink / raw)
To: Steffen Klassert
Cc: Herbert Xu, David S . Miller, Jakub Kicinski, netdev,
linux-kernel, luo penghao, Zeal Robot
From: luo penghao <luo.penghao@zte.com.cn>
The statement in the switch is repeated with the statement at the
beginning of the while loop, so this statement is meaningless.
The clang_analyzer complains as follows:
net/xfrm/xfrm_policy.c:3392:2 warning:
Value stored to 'exthdr' is never read
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
net/xfrm/xfrm_policy.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 7f881f5..e8a31b9 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -3389,7 +3389,6 @@ decode_session6(struct sk_buff *skb, struct flowi *fl, bool reverse)
case NEXTHDR_DEST:
offset += ipv6_optlen(exthdr);
nexthdr = exthdr->nexthdr;
- exthdr = (struct ipv6_opt_hdr *)(nh + offset);
break;
case IPPROTO_UDP:
case IPPROTO_UDPLITE:
--
2.15.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH linux-next] xfrm: Remove duplicate assignment
2021-11-04 6:26 [PATCH linux-next] xfrm: Remove duplicate assignment cgel.zte
@ 2021-11-19 8:38 ` Steffen Klassert
0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2021-11-19 8:38 UTC (permalink / raw)
To: cgel.zte
Cc: Herbert Xu, David S . Miller, Jakub Kicinski, netdev,
linux-kernel, luo penghao, Zeal Robot
On Thu, Nov 04, 2021 at 06:26:21AM +0000, cgel.zte@gmail.com wrote:
> From: luo penghao <luo.penghao@zte.com.cn>
>
> The statement in the switch is repeated with the statement at the
> beginning of the while loop, so this statement is meaningless.
>
> The clang_analyzer complains as follows:
>
> net/xfrm/xfrm_policy.c:3392:2 warning:
>
> Value stored to 'exthdr' is never read
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
Applied to ipsec-next, thanks luo!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-19 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 6:26 [PATCH linux-next] xfrm: Remove duplicate assignment cgel.zte
2021-11-19 8:38 ` Steffen Klassert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®