Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2330538rwd; Wed, 14 Jun 2023 01:00:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ71HKCpoxPvpF/Gtn/KfXwI8j0DdMgEd+XuG5kZiS0Gx7GKLbH29+4itNHMN9kU6UqSAgHd X-Received: by 2002:a92:d9c7:0:b0:33d:1072:3619 with SMTP id n7-20020a92d9c7000000b0033d10723619mr11921058ilq.22.1686729630682; Wed, 14 Jun 2023 01:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686729630; cv=none; d=google.com; s=arc-20160816; b=GgaKsinDKJx5qKPJKOfK7lMcCMuQjeX+GpYVkCY2NTD8LOZb2zZ4LQMawqeEMTp3o9 GxnbLcPx4nlMhi9fd4fWyin0j0edhk8gT7suX/Gwq5terELFkGziYlqYZsScaUmtTitI NWxLu3XHCf5MDi2JwupxO9YgOuhXNj6iiiG3Udnwk29Eq9KaXzHsamR2z5Nx1PV13HZU rLEGBR9wEQzwrZzuFTGYhW0cDOx9MIv4GE4DijJ5q7pNUHPCqrvjMcx3wLTOTGgsD4SA s9PIPAt8bYReLrMJauh/rOZIEDlcJn13fqZzJiinM4Da9QH4yGKBAic0fpBd+ssW1SOc LPVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=KUcqDt0Oa58vTC8L9dZs0yZYjcVjZF/xz68m1jJ7jSs=; b=GIySj2dX9wAefNSGYwFEY+luzRx1aa3CJ/s2Swm6VKc5iQ07BvAzAHYpw6aRPfLNT3 T+vVrup223PsaGueDMKIJMRdHK0iCUtqolnRyCIMamx9pz9eW6uPoDD0PzaTqj4RDAuw 0vTqfHLPLD/xhnXhRksgH8HA01uYkAtFSbYahTefzPd4Mct9Tf2INWdnFW4cCPvy5+d/ 38HPqdeHr05Y9qlzDSse2DeP8A8h/muJSqx+HV/Nsz9c5RChnWA/WuaZMXFLeXxqXLKk zRipW4Rsv3nvTuoZGD3p3Dm4t9N84FoIgxNZhpOmhtFJSABu9iQD8x/jsuI8ARJK7bou IRcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=QCwMuqdV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu21-20020a632955000000b0053ef547263csi10186184pgb.398.2023.06.14.01.00.18; Wed, 14 Jun 2023 01:00:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=QCwMuqdV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235480AbjFNHmm (ORCPT + 99 others); Wed, 14 Jun 2023 03:42:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234764AbjFNHml (ORCPT ); Wed, 14 Jun 2023 03:42:41 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA85719BC for ; Wed, 14 Jun 2023 00:42:36 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4Qgy7Z5tHLzBQJYp for ; Wed, 14 Jun 2023 15:42:34 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1686728554; x=1689320555; bh=snMogAIL9y2byMbsZXqj+hiozP/ +XS6VEZBwL8D7BD8=; b=QCwMuqdVsxZLhCViwgbZUgy8hRFEaVoU5f6prngM7lj xh2B+HTGC5E3icZpe9pcHYrn82WrJ1tZCRJGtZSoCn11TzJ/ipPmkRhM7SiTpdVM Qv+Zu7eV8KP/vOOwyulFckqmtzXtLw7j5exUW/EKRv3CxWfBpVLWEMmd9v0Lr72E t5KiUlLOcM9QjZ86AO1w/3jf1pN79SKgVmkMEJU/VFf5nNA1Iwhot9YOZLLNJNVj 01KjzIjRF3jYDx8i99yzBXy/rEYG/bB05ZA5PS0KQ+LWeDRl+jIQwU+Sy7mu9uV4 1rZP7f1F/+zWHkWUqdD5cCGhscrvrtoOM4M3njOn4Lg== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1RfLbslxkzTZ for ; Wed, 14 Jun 2023 15:42:34 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4Qgy7Z3WNczBQJYk; Wed, 14 Jun 2023 15:42:34 +0800 (CST) MIME-Version: 1.0 Date: Wed, 14 Jun 2023 15:42:34 +0800 From: wuyonggang001@208suo.com To: andrii@kernel.org, shuah@kernel.org Cc: bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests/bpf: Fix the address is NULL In-Reply-To: <20230614073443.4894-1-zhanglibing@cdjrlc.com> References: <20230614073443.4894-1-zhanglibing@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: <7f34bd3ce377d9d89626c2df8fa584e0@208suo.com> X-Sender: wuyonggang001@208suo.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RDNS_NONE,SPF_HELO_FAIL,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck error: tools/testing/selftests/bpf/progs/test_ksyms_weak.c:53:6-20: ERROR: test of a variable/field address Signed-off-by: Yonggang Wu --- tools/testing/selftests/bpf/progs/test_ksyms_weak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/progs/test_ksyms_weak.c b/tools/testing/selftests/bpf/progs/test_ksyms_weak.c index d00268c91e19..768a4d6ee6f5 100644 --- a/tools/testing/selftests/bpf/progs/test_ksyms_weak.c +++ b/tools/testing/selftests/bpf/progs/test_ksyms_weak.c @@ -50,7 +50,7 @@ int pass_handler(const void *ctx) /* tests non-existent symbols. */ out__non_existent_typed = (__u64)&bpf_link_fops2; - if (&bpf_link_fops2) /* can't happen */ + if (&bpf_link_fops2 != NULL) /* can't happen */ out__non_existent_typed = (__u64)bpf_per_cpu_ptr(&bpf_link_fops2, 0); if (!bpf_ksym_exists(bpf_task_acquire))