esp6: Simplify the calculation of variables
Subsystems (3)
PATCH 1/1 esp6: Simplify the calculation of variables
Fix the following coccicheck warnings:
./net/ipv6/esp6_offload.c:321:32-34: WARNING !A || A && B is equivalent to !A || B.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- net/ipv6/esp6_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/esp6_offload.c +1 -1
@@ -318,7 +318,7 @@ static int esp6_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features esp.plen = esp.clen - skb->len - esp.tfclen; esp.tailen = esp.tfclen + esp.plen + alen; -if (!hw_offload || (hw_offload && !skb_is_gso (skb))) { +if (!hw_offload || !skb_is_gso (skb)) { esp.nfrags =esp6_output_head (x, skb, &esp);if (esp.nfrags <0 )return esp.nfrags;
Signature · 1 line
1.8.3.1
Steffen Klassert
maintainerQuoted 16 lines · Jiapeng Chong
Fix the following coccicheck warnings:
./net/ipv6/esp6_offload.c:321:32-34: WARNING !A || A && B is equivalent to !A || B.
Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- net/ipv6/esp6_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/ipv6/esp6_offload.c +0
-0
net/ipv6/esp6_offload.c static int esp6_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features · line 324
Quoted 8 lines
net/ipv6/esp6_offload.c +1
-1@@ -318,7 +318,7 @@ static int esp6_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features esp.plen = esp.clen - skb->len - esp.tfclen; esp.tailen = esp.tfclen + esp.plen + alen; -if (!hw_offload || (hw_offload && !skb_is_gso (skb))) { +if (!hw_offload || !skb_is_gso (skb)) { esp.nfrags =esp6_output_head (x, skb, &esp);if (esp.nfrags <0 )return esp.nfrags;
That one is already in ipsec-next:
Commit f076835a8bf2aa6ea48f718e4506587c815ab99f
Author: Junlin Yang <[email protected]> Date: Thu Mar 11 10:07:56 2021 +0800
esp6: remove a duplicative condition
Fixes coccicheck warnings:
./net/ipv6/esp6_offload.c:319:32-34:
WARNING !A || A && B is equivalent to !A || B
Signed-off-by Junlin Yang <[email protected]>
Signed-off-by Steffen Klassert <[email protected]>