* [PATCH v2] net: Simplify the calculation of variables
@ 2021-01-25 6:41 Jiapeng Zhong
2021-01-28 8:56 ` Steffen Klassert
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Zhong @ 2021-01-25 6:41 UTC (permalink / raw)
To: steffen.klassert
Cc: herbert, davem, yoshfuji, kuba, netdev, linux-kernel, Jiapeng Zhong
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@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
Changes in v2:
-Drop the parenthesis around !skb_is_gso(skb) now.
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..601f5fb 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;
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v2] net: Simplify the calculation of variables
2021-01-25 6:41 [PATCH v2] net: Simplify the calculation of variables Jiapeng Zhong
@ 2021-01-28 8:56 ` Steffen Klassert
0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2021-01-28 8:56 UTC (permalink / raw)
To: Jiapeng Zhong; +Cc: herbert, davem, yoshfuji, kuba, netdev, linux-kernel
On Mon, Jan 25, 2021 at 02:41:46PM +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@linux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Patch applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-28 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25 6:41 [PATCH v2] net: Simplify the calculation of variables Jiapeng Zhong
2021-01-28 8:56 ` Steffen Klassert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®