From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A0BEEB64DD for ; Fri, 11 Aug 2023 16:10:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 95F616B0074; Fri, 11 Aug 2023 12:10:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 90F696B0078; Fri, 11 Aug 2023 12:10:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7FF4A6B007B; Fri, 11 Aug 2023 12:10:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 729416B0074 for ; Fri, 11 Aug 2023 12:10:44 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 0837C1A1243 for ; Fri, 11 Aug 2023 16:10:44 +0000 (UTC) X-FDA: 81112312008.20.E585815 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf02.hostedemail.com (Postfix) with ESMTP id 02F408002E for ; Fri, 11 Aug 2023 16:10:40 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YfHi0Jm1; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf02.hostedemail.com: domain of "SRS0=VRW/=D4=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=VRW/=D4=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691770241; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/f0amooYVmK8FCDOPEO9Uk2FOSmotp7/42ORz3MEsxY=; b=n3WY5ptomaCZAJHDgYS71OE8WwxiA8t+Q9oRVEOmW1cq/MxYXyvRbNUpRfn8xqDlhq2EbT PvHP2hB5UXbKx5qhR7mjzuXSYwsE9CTrj/tlyvpAVcHhjjNNMAjpOJ60VKkTV5o69+2jeX 6vXJdCKKm4iHrKMi+COAteQKAW2kOlI= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=YfHi0Jm1; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf02.hostedemail.com: domain of "SRS0=VRW/=D4=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=VRW/=D4=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691770241; a=rsa-sha256; cv=none; b=v6BaeDUDS31FkOV2ZAAG8A2Zwwga+uMI0taW8x2VirbLyCK3JSK0aRBiusIa05wMzM4rbn 5xlKBJTHMZ8IYTJYkksaUrfGHFw2dYKB7ariYTOp45OPpqkEQpshOpSNx61ngN0WAr8oU1 NWZ7jHmMjcl2CCO2y6iGTVpwVAF0HeM= 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 08E9C61149; Fri, 11 Aug 2023 16:10:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6DB00C433C7; Fri, 11 Aug 2023 16:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691770239; bh=71MKhu1fvjLDJVDqx6mDJu7KGaWozmoNqaavj43sioQ=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=YfHi0Jm1JFhlt9l7OuaywkfyZOHcZ5NLQmBC7Uhg5XzLJOKO8c/DN1kdtCFD6sQ/Q rgAH/zX11sTwf4OSWAGLdhHTd7ZXmIpqoygl6JGRl17cFr3TocgqcDGuwzC8XR5DxT oZab6JnmXE3Uht6Fox8QTboKefoGY4knIEPyTXbcfv92Kds+uX2ipG9BI9PefR36rq 6FOEef82++cFZxxNIiB4NTtkIjGI1mGSVYSojAyVt2aKQqQQbncYmXf/Aed49rWbg0 IDJQEuprN70fqVsNKGor5FZ7N2Ik6Ea86Q447rMObnDKSi6PfxLhFFvccAxCrkgRUg mMDxS3uttXXqw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 0E55BCE0593; Fri, 11 Aug 2023 09:10:39 -0700 (PDT) Date: Fri, 11 Aug 2023 09:10:39 -0700 From: "Paul E. McKenney" To: kernel test robot Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List Subject: Re: [linux-next:master 5658/8441] kernel/rcu/update.c:529:6: warning: no previous prototype for function 'torture_sched_setaffinity' Message-ID: Reply-To: paulmck@kernel.org References: <202308111926.gYjAUtn4-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202308111926.gYjAUtn4-lkp@intel.com> X-Rspamd-Queue-Id: 02F408002E X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: k7yoy3xozzb6ji3sqpun5a5wewjj6ijd X-HE-Tag: 1691770240-275818 X-HE-Meta: U2FsdGVkX1/ToEjFGzA1yW+O/VfLCYXSGlJMlHR/5uPu+L9ijtKkXh/YVjgRKGjdhhDlSk2FePkfva/92MViHTzZL9SlFE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vqu6azVOmLslBInR5eEc9PCs8Jw5Hb8c4MIHghynR2O30SXH3yq4600p1djLZmXUoS1bqrOj1qIXxk8O4mcaq5ET9oLZJgmCPTsI0ePmr6YFeX3CKLDMDPvyimzYJxPJ2n9846+SH6VF1ZOvTj0OXUVQHu8y4lCSJvUm9bWeKcDxEco+v1/9Z4cB6mx4O1gO6X3+zKH87vlgGhT+Iuzsc5NHe4Kj1WZpNAVCCsdpWSnaGI62gTx9Uc/cqDd2vVpvd+j9Va3lVPIH3rY1Qky+1DC9eteLxFJBFs1tn/BxqcHD6ShjQnT7nYUHb/AhsPJIy1PcvZekanQWsN2r+gQP8Sp/omTnCPOGy5zghRPPmwGm1Chs4aNmo2Tw4IMGuX1VRjyRJXcpS2T6J/n3NrLlQpDMvfQ3wtvOBxxpGaoMArRtNSeE+rHBNjTYZZbJvVzdxQ1EDtDapwFZC5FqcVYhe/n3oRE0NSFS8wwcMgS/obmDusCsr9XLIvQIY2T4IAH6ZUytJ7siPEj1jW93B+sIYJ+Fpz0PwrZmPDCbORxxMVFlMnffp/jNStADD0MgKL36UtWGmQDsFgCeP8ffZ6/ya8Y9KPbOSv9YzKXLqA/VUsHf41/UoEn1oxYOIMoOWI3HvGwkMewpvB0mZfU9ZnDfUYQy+8QlDrRi9CTZpA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Aug 11, 2023 at 07:13:48PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 21ef7b1e17d039053edaeaf41142423810572741 > commit: 521ec59e5453e03a255e183ccee844fe3612f1b4 [5658/8441] torture: Move rcutorture_sched_setaffinity() out of rcutorture > config: x86_64-randconfig-x012-20230811 (https://download.01.org/0day-ci/archive/20230811/202308111926.gYjAUtn4-lkp@intel.com/config) > compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) > reproduce: (https://download.01.org/0day-ci/archive/20230811/202308111926.gYjAUtn4-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202308111926.gYjAUtn4-lkp@intel.com/ > > All warnings (new ones prefixed by >>): > > >> kernel/rcu/update.c:529:6: warning: no previous prototype for function 'torture_sched_setaffinity' [-Wmissing-prototypes] > long torture_sched_setaffinity(pid_t pid, const struct cpumask *in_mask) > ^ > kernel/rcu/update.c:529:1: note: declare 'static' if the function is not intended to be used outside of this translation unit > long torture_sched_setaffinity(pid_t pid, const struct cpumask *in_mask) > ^ > static > 1 warning generated. > > > vim +/torture_sched_setaffinity +529 kernel/rcu/update.c > > 526 > 527 #if IS_ENABLED(CONFIG_RCU_TORTURE_TEST) || IS_MODULE(CONFIG_RCU_TORTURE_TEST) || IS_ENABLED(CONFIG_LOCK_TORTURE_TEST) || IS_MODULE(CONFIG_LOCK_TORTURE_TEST) > 528 /* Get rcutorture access to sched_setaffinity(). */ > > 529 long torture_sched_setaffinity(pid_t pid, const struct cpumask *in_mask) > 530 { > 531 int ret; > 532 > 533 ret = sched_setaffinity(pid, in_mask); > 534 WARN_ONCE(ret, "%s: sched_setaffinity(%d) returned %d\n", __func__, pid, ret); > 535 return ret; > 536 } > 537 EXPORT_SYMBOL_GPL(torture_sched_setaffinity); > 538 #endif > 539 Hmmm... The update.c source file includes torture.h which provides the declaration with the same set of #if conditions as the definition. But does this diff help? Thanx, Paul ----------------------------------------------------------------------- diff --git a/include/linux/torture.h b/include/linux/torture.h index c98d0c83d117..7d2c070e66d2 100644 --- a/include/linux/torture.h +++ b/include/linux/torture.h @@ -128,8 +128,6 @@ void _torture_stop_kthread(char *m, struct task_struct **tp); #define torture_preempt_schedule() do { } while (0) #endif -#if IS_ENABLED(CONFIG_RCU_TORTURE_TEST) || IS_MODULE(CONFIG_RCU_TORTURE_TEST) || IS_ENABLED(CONFIG_LOCK_TORTURE_TEST) || IS_MODULE(CONFIG_LOCK_TORTURE_TEST) long torture_sched_setaffinity(pid_t pid, const struct cpumask *in_mask); -#endif #endif /* __LINUX_TORTURE_H */