Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1026370pxb; Thu, 4 Mar 2021 01:00:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8vaD1cjUbEWQ0PehlJDH9Q7aFOPwyKtJC7SYdFtaTLstNWEGW4YOPDEQ6l/UEsWhCjRe7 X-Received: by 2002:a50:9d4d:: with SMTP id j13mr3093715edk.83.1614848418666; Thu, 04 Mar 2021 01:00:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614848418; cv=none; d=google.com; s=arc-20160816; b=s/xVwxRSLFPhQtMjQZ5OfdvIhh3T86BGaStZsX3HdjJi2ufHBH0U5YEWEByBb2/u9n ZRf+NqG3776Ff53FhllwQG9Cz+N4Lf9FaJEhXmrW8K+bYKQesYbzBmXqUsxZ4drELwj4 TJHw9nKqrA3oTdpBDuHh5kCAjGF7rvMqPgD1zy4kv29lRSsBNVLxKRUmrxMlNW+pCOkr Q8AQvhcV9vVzPeVmwQJ2u0H5pmE31BoRi3QqpvE+XKOHNoV7oqbGPb6DAQ4xpvmEUfxN p0/ZcqSO+uba0iCtDnB/xzTCr1Wy9pxEhOCXDOJ92GMJmExNGc8MpD6HFpLqhnIIN+ba iC1A== 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=zkNiEzVnA9AyQ9RSW/z3+bVw4IL8YOtDqlFQhAuKfyE=; b=y0Wrl5qER2KJnp7Q6o4EjBCimcEiBmHKwsBOfH4TWxko096lV7LiAHiZvU6lP9IMw0 YxCy90oa7qnJy8M+llwRci69bdtgsloKcTxI9zed9u9dIWvXBEKAKcYWbe/TRduvfsbC twfaDWvLWr2xkzPM5N4LRwIN4GQ5mPPlR0U0PUuQRZETn+TmjlNJSVJkZZO1PXL02dxs Rh9dY5QWBYVpkh6sovSxQ5XMHLHY3S8dfYEfZTKg9yn97LcggC7ixJJRSJPuvBAGq8Sh 5jRBTWz4RGhUsg1Uu85rn9b4PBa2UDLDuG/odSttjE5pDnSgAFtPKrT6dy6O/cvCyFa7 0a0A== 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 cf26si9488045ejb.702.2021.03.04.00.59.56; Thu, 04 Mar 2021 01:00:18 -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 S239121AbhCCMvC (ORCPT + 99 others); Wed, 3 Mar 2021 07:51:02 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:47459 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1842580AbhCCIH5 (ORCPT ); Wed, 3 Mar 2021 03:07:57 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0UQD.Zw3_1614757930; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UQD.Zw3_1614757930) by smtp.aliyun-inc.com(127.0.0.1); Wed, 03 Mar 2021 15:52:15 +0800 From: Jiapeng Chong To: shuah@kernel.org Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] selftests/bpf: Simplify the calculation of variables Date: Wed, 3 Mar 2021 15:52:10 +0800 Message-Id: <1614757930-17197-1-git-send-email-jiapeng.chong@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: ./tools/testing/selftests/bpf/test_sockmap.c:735:35-37: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/bpf/test_sockmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c index 427ca00..eefd445 100644 --- a/tools/testing/selftests/bpf/test_sockmap.c +++ b/tools/testing/selftests/bpf/test_sockmap.c @@ -732,7 +732,7 @@ static int sendmsg_test(struct sockmap_options *opt) * socket is not a valid test. So in this case lets not * enable kTLS but still run the test. */ - if (!txmsg_redir || (txmsg_redir && txmsg_ingress)) { + if (!txmsg_redir || txmsg_ingress) { err = sockmap_init_ktls(opt->verbose, rx_fd); if (err) return err; -- 1.8.3.1