linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] esp6: remove a duplicative condition
@ 2021-03-11  2:07 angkery
  2021-03-15 10:26 ` Steffen Klassert
  0 siblings, 1 reply; 2+ messages in thread
From: angkery @ 2021-03-11  2:07 UTC (permalink / raw)
  To: steffen.klassert, herbert, davem, yoshfuji, dsahern, kuba
  Cc: netdev, linux-kernel, Junlin Yang

From: Junlin Yang <yangjunlin@yulong.com>

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>
---
 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 1ca516f..631c168 100644
--- a/net/ipv6/esp6_offload.c
+++ b/net/ipv6/esp6_offload.c
@@ -316,7 +316,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.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] esp6: remove a duplicative condition
  2021-03-11  2:07 [PATCH] esp6: remove a duplicative condition angkery
@ 2021-03-15 10:26 ` Steffen Klassert
  0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2021-03-15 10:26 UTC (permalink / raw)
  To: angkery
  Cc: herbert, davem, yoshfuji, dsahern, kuba, netdev, linux-kernel,
	Junlin Yang

On Thu, Mar 11, 2021 at 10:07:56AM +0800, angkery wrote:
> From: Junlin Yang <yangjunlin@yulong.com>
> 
> 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>

Applied to ipsec-next, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-15 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11  2:07 [PATCH] esp6: remove a duplicative condition angkery
2021-03-15 10:26 ` Steffen Klassert

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).