From: Steffen Klassert <steffen.klassert@secunet.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: <herbert@gondor.apana.org.au>, <davem@davemloft.net>,
<yoshfuji@linux-ipv6.org>, <dsahern@kernel.org>,
<kuba@kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] esp6: Simplify the calculation of variables
Date: Wed, 14 Apr 2021 12:11:28 +0200 [thread overview]
Message-ID: <20210414101128.GY62598@gauss3.secunet.de> (raw)
In-Reply-To: <1618307835-83161-1-git-send-email-jiapeng.chong@linux.alibaba.com>
On Tue, Apr 13, 2021 at 05:57:15PM +0800, Jiapeng Chong wrote:
> 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@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.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;
That one is already in ipsec-next:
Commit f076835a8bf2aa6ea48f718e4506587c815ab99f
Author: Junlin Yang <yangjunlin@yulong.com>
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 <yangjunlin@yulong.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
prev parent reply other threads:[~2021-04-14 10:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 9:57 [PATCH] esp6: Simplify the calculation of variables Jiapeng Chong
2021-04-14 10:11 ` Steffen Klassert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210414101128.GY62598@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).