[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210122192617.2f7994e0@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 22 Jan 2021 19:26:17 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
Cc: steffen.klassert@...unet.com, herbert@...dor.apana.org.au,
davem@...emloft.net, yoshfuji@...ux-ipv6.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: Simplify the calculation of variables
On Fri, 22 Jan 2021 16:57:47 +0800 Jiapeng Zhong wrote:
> 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 <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
> ---
> net/ipv4/esp4_offload.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/esp4_offload.c b/net/ipv4/esp4_offload.c
> index 5bda5ae..9ba8cc5 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))) {
You can drop the parenthesis around !skb_is_gso(skb) now.
> esp.nfrags = esp_output_head(x, skb, &esp);
> if (esp.nfrags < 0)
> return esp.nfrags;
Powered by blists - more mailing lists