* [linux-next:master 5658/8441] kernel/rcu/update.c:529:6: warning: no previous prototype for function 'torture_sched_setaffinity'
@ 2023-08-11 11:13 kernel test robot
2023-08-11 16:10 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2023-08-11 11:13 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: llvm, oe-kbuild-all, Linux Memory Management List
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 <lkp@intel.com>
| 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
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 5658/8441] kernel/rcu/update.c:529:6: warning: no previous prototype for function 'torture_sched_setaffinity'
2023-08-11 11:13 [linux-next:master 5658/8441] kernel/rcu/update.c:529:6: warning: no previous prototype for function 'torture_sched_setaffinity' kernel test robot
@ 2023-08-11 16:10 ` Paul E. McKenney
2023-08-11 16:48 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2023-08-11 16:10 UTC (permalink / raw)
To: kernel test robot; +Cc: llvm, oe-kbuild-all, Linux Memory Management List
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 <lkp@intel.com>
> | 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 */
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [linux-next:master 5658/8441] kernel/rcu/update.c:529:6: warning: no previous prototype for function 'torture_sched_setaffinity'
2023-08-11 16:10 ` Paul E. McKenney
@ 2023-08-11 16:48 ` Paul E. McKenney
0 siblings, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2023-08-11 16:48 UTC (permalink / raw)
To: kernel test robot; +Cc: llvm, oe-kbuild-all, Linux Memory Management List
On Fri, Aug 11, 2023 at 09:10:39AM -0700, Paul E. McKenney wrote:
> 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 <lkp@intel.com>
> > | 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?
Never mind!
Fixed by this commit:
778df208f001 ("rcu: Include torture_sched_setaffinity() declaration")
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 */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-11 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11 11:13 [linux-next:master 5658/8441] kernel/rcu/update.c:529:6: warning: no previous prototype for function 'torture_sched_setaffinity' kernel test robot
2023-08-11 16:10 ` Paul E. McKenney
2023-08-11 16:48 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).