From: Jiapeng Zhong Date: Mon, 25 Jan 2021 06:41:46 +0000 (+0800) Subject: net: Simplify the calculation of variables X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0c87b1ac604518a0d3f527080c6883d5c2402fb4;p=linux.git net: Simplify the calculation of variables Fix the following coccicheck warnings: ./net/ipv4/esp4_offload.c:288:32-34: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong Signed-off-by: Steffen Klassert --- diff --git a/net/ipv4/esp4_offload.c b/net/ipv4/esp4_offload.c index 5bda5aeda5791..601f5fbfc63fb 100644 --- a/net/ipv4/esp4_offload.c +++ b/net/ipv4/esp4_offload.c @@ -285,7 +285,7 @@ static int esp_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features_ esp.esph = ip_esp_hdr(skb); - if (!hw_offload || (hw_offload && !skb_is_gso(skb))) { + if (!hw_offload || !skb_is_gso(skb)) { esp.nfrags = esp_output_head(x, skb, &esp); if (esp.nfrags < 0) return esp.nfrags;