[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1618307835-83161-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Tue, 13 Apr 2021 17:57:15 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: steffen.klassert@...unet.com
Cc: herbert@...dor.apana.org.au, davem@...emloft.net,
yoshfuji@...ux-ipv6.org, dsahern@...nel.org, kuba@...nel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] 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 <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
net/ipv6/esp6_offload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/esp6_offload.c b/net/ipv6/esp6_offload.c
index 4af56af..40ed4fc 100644
--- a/net/ipv6/esp6_offload.c
+++ b/net/ipv6/esp6_offload.c
@@ -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;
--
1.8.3.1
Powered by blists - more mailing lists