Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2837791pxb; Sun, 24 Jan 2021 23:04:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnWPgBYypyXUWoTCL2dXeOtcI/dIrouxmq6ys62ZFYhZtVmVh1punrIyPlzaM2hqzL2fmg X-Received: by 2002:a05:6402:35ca:: with SMTP id z10mr505719edc.186.1611558261434; Sun, 24 Jan 2021 23:04:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611558261; cv=none; d=google.com; s=arc-20160816; b=Et5myIm/7XGwa0p+d+jahkSzPiN3/XUK8PFG2NTSEUm8I1RrhWAJjirmi2W5C7W/Qh EJ7vnRv+jDYqMGBMnnQM/Mf+yzOlGw7i5WtB46yjY1RBFHpiwruo01lv6kUfFXXij5+p gcdrcpoJC8WHp8X4Yr8ECh9rlRyVWWqJjaKhRbkkfJCtnfevWV4Dyb/wbNIHe8KMOagI c9sK4bJyKRH5l/xaaq3sbKhKmPc6wrL6uK3VTauYfF0yUXmjDhlBf8mlA1NPiVGAgnjq iZnGGDV9Rm5dHBh8F/EK/uAxRQTFD4/kLbr8jVQs5FswwY3kkfSI03rFCi1KQvz6cgok hqwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=lzsPd1Q0pO5XdA+8xXaZ+qOjql8+5f/wzvv6B6dgZdw=; b=S765U7/UwxZgSRTuZzClWq3Xi/yU1Xah2c9fFs6uCZ58xv5aG2KSd5WxObX8oOn05B AwFAOstBze+935lT+F4wl1D/FFf/M/ChLThhIe/RMYKYGymfJDfwIPOMN7ByKmduK4qb UiQ7LIkeLeG+KuCSA1hiZjq3PEJHbPwIsmZmcYYg59vS1zCwMghkZhhriy+JwgDyFtSx 7Ut2WCUje/zLUdZOggCO8745Q1D0iyy1cUSeI9GDnfU3dlys+b7Qzng4Vw28hDvY5KBn 5pYH6e/yclgJDrQSzSlhgdquoRk6g6ZmXSeTB0TN7yzW9r63gq7njrPOzg1NVgLLCrxQ nCeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si7157432eds.484.2021.01.24.23.03.57; Sun, 24 Jan 2021 23:04:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727139AbhAYHA7 (ORCPT + 99 others); Mon, 25 Jan 2021 02:00:59 -0500 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:34704 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727114AbhAYGmg (ORCPT ); Mon, 25 Jan 2021 01:42:36 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R701e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=abaci-bugfix@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UMkwmB0_1611556907; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:abaci-bugfix@linux.alibaba.com fp:SMTPD_---0UMkwmB0_1611556907) by smtp.aliyun-inc.com(127.0.0.1); Mon, 25 Jan 2021 14:41:52 +0800 From: Jiapeng Zhong To: steffen.klassert@secunet.com Cc: herbert@gondor.apana.org.au, davem@davemloft.net, yoshfuji@linux-ipv6.org, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Zhong Subject: [PATCH v2] net: Simplify the calculation of variables Date: Mon, 25 Jan 2021 14:41:46 +0800 Message-Id: <1611556906-72262-1-git-send-email-abaci-bugfix@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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