Message ID | ZMj8+bvN86D0ZKiB@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2686091vqg; Tue, 1 Aug 2023 06:59:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlHifAftbbwY21ZYMSHQeNB0OVAgqvq7GpqmmEjbOwFuPTHZVWdrlGZR1iwaBgg1LCqoqUmr X-Received: by 2002:a17:906:7a5c:b0:992:3ac7:a2da with SMTP id i28-20020a1709067a5c00b009923ac7a2damr2527558ejo.30.1690898345968; Tue, 01 Aug 2023 06:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690898345; cv=none; d=google.com; s=arc-20160816; b=zYhZ2Hvcxsyp4gYQYVGzD0W8d+Jfz/1F9fmy9CvPHO/IvYq+vX1uiCUsBI1YTfE1n+ 905E2/seY8+54rHL+xxbRYSH9c+8UcAiZN7AmUk99/6buHIP6G8SQJGFETmchTA2loAr bdoADA4g7bJcTfBjjkhG1Z40XFjspXT3pVZK5yrHwmd9bvduTD32GN7Lrsv+GTZwZJoS yeB6IF9LDWo2UNMqsW8F0N42nczeRt1mnqf5VjdITlMiDk9ykZtnXOnsChO5F5OMGRjm ESjnIUVGdEYLVrTDJI/RjTHOF7QAAzFGugbqwJL14OQcCbe9wF02DE7fFBDejBcnuzfN vNOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=CkRnYmV/C8p4JK67scFMzSfIFXUBzrvH7wzsNfbMGLY=; fh=yoTV63z9cMvXM+t9AB3oNx784qBHPcbwqOBMICkg2Xs=; b=rpb5Z7Jh0y4RVZvhzDxorFgY89x+L8bIrfyQMqZucxqDphYL5SzlcOdhD/ggD9vIEv 8aXOXl/+A6ugt40YNYztplNcx8D6OZFKzSUXFsF+K72AWRA4R01N07wH1bZXBuYAhFom v8yWDO7AQedimfh5z/YOf+UWaduCXRQJtPgrTOBPsda1aVoZPkaA642+lZzOk9T6LrVG vEh6/mf1rc9p4agDf74TBHwVSJsFy1S9uaNVBwAzGmeonLt2cDP5r0NjM5V6fonALqo3 DPvBx1RNeGqFAgXVVU0aSQHM7y79KOfXGwEX2BZuGAG5JwzbrFVKV3a/NJSqRw1c03Bm tCGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CrmA23r2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id um9-20020a170906cf8900b00992d6fa3b33si8359270ejb.440.2023.08.01.06.58.42; Tue, 01 Aug 2023 06:59:05 -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=pass header.i=@kernel.org header.s=k20201202 header.b=CrmA23r2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232633AbjHAMj2 (ORCPT <rfc822;maxi.paulin@gmail.com> + 99 others); Tue, 1 Aug 2023 08:39:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230244AbjHAMj1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Aug 2023 08:39:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B15A8 for <linux-kernel@vger.kernel.org>; Tue, 1 Aug 2023 05:39:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BA5D161564 for <linux-kernel@vger.kernel.org>; Tue, 1 Aug 2023 12:39:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E79D6C433C7; Tue, 1 Aug 2023 12:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690893565; bh=ptHIP8rflq98VVazSu1Ujyg+iZNZce3MRFi7SGKE1nU=; h=Date:From:To:Cc:Subject:From; b=CrmA23r2+N7MKz3P3DCdW3VKE0aLpWFNl0intF5HregYdyO1TOogJZqX0zk4cABnj bVH8hHtiCQx4g/xNlB3bjSiaSaf/iLXFPoQtCUlzaLlCHaoSSvuyBLYXmNYhrL6lHc WfgFZkOjpJCD2FKEqUjcf2qHvpAOhIdqGTb9VPNhc6PkUlFPhmN87Z7JCEBzFSMYg/ hkUgxrMVMG0DKwcLW0sJOApPgvW/d+7CY3Kki53rMyiuio9WfxaK6dyhuOHwHKTWmC aHQZB3bWm3YavUCSuW5KWNVOg6YbZ+8DXTMXxyxQiDCi8u/8SIN/ZoywNvVPxL4tmE KIj25Jnh1AdGQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 09C9240096; Tue, 1 Aug 2023 09:39:22 -0300 (-03) Date: Tue, 1 Aug 2023 09:39:21 -0300 From: Arnaldo Carvalho de Melo <acme@kernel.org> To: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com>, Ian Rogers <irogers@google.com>, Jiri Olsa <jolsa@kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: [PATCH 1/1] perf test bpf: Address error about non-null argument for epoll_pwait 2nd arg Message-ID: <ZMj8+bvN86D0ZKiB@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773035423831697365 X-GMAIL-MSGID: 1773035423831697365 |
Series |
[1/1] perf test bpf: Address error about non-null argument for epoll_pwait 2nd arg
|
|
Commit Message
Arnaldo Carvalho de Melo
Aug. 1, 2023, 12:39 p.m. UTC
First noticed on Fedora Rawhide:
tests/bpf.c: In function ‘epoll_pwait_loop’:
tests/bpf.c:36:17: error: argument 2 null where non-null expected [-Werror=nonnull]
36 | epoll_pwait(-(i + 1), NULL, 0, 0, NULL);
| ^~~~~~~~~~~
In file included from tests/bpf.c:5:
/usr/include/sys/epoll.h:134:12: note: in a call to function ‘epoll_pwait’ declared ‘nonnull’
134 | extern int epoll_pwait (int __epfd, struct epoll_event *__events,
| ^~~~~~~~~~~
[perfbuilder@27cfe44d67ed perf-6.5.0-rc2]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-13.2.1-20230728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-offload-defaulted --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.1 20230728 (Red Hat 13.2.1-1) (GCC)
[perfbuilder@27cfe44d67ed perf-6.5.0-rc2]$
Just add that argument to address this compiler warning.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/bpf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 31796f2a80f47fb1..9ccecd873ecdd046 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c @@ -29,11 +29,12 @@ static int epoll_pwait_loop(void) { + struct epoll_event events; int i; /* Should fail NR_ITERS times */ for (i = 0; i < NR_ITERS; i++) - epoll_pwait(-(i + 1), NULL, 0, 0, NULL); + epoll_pwait(-(i + 1), &events, 0, 0, NULL); return 0; }