* [rcu:rcu/dev 35/36] kernel/sched/idle.c:184:1: sparse: symbol '__pcpu_scope_cpu_dead_idle' was not declared. Should it be static?
@ 2015-01-30 0:43 kbuild test robot
2015-01-30 0:43 ` [PATCH rcu] cpu: __pcpu_scope_cpu_dead_idle can be static kbuild test robot
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2015-01-30 0:43 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: kbuild-all, Ingo Molnar, Peter Zijlstra, linux-kernel
tree: git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/dev
head: c0d4bae9db364cdb6e1cabad45a045a04d99cf51
commit: 86166c3e1e073e5e037d97bc51c66ef3fe1e90a4 [35/36] cpu: Make CPU-offline idle-loop transition point more precise
reproduce:
# apt-get install sparse
git checkout 86166c3e1e073e5e037d97bc51c66ef3fe1e90a4
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> kernel/sched/idle.c:184:1: sparse: symbol '__pcpu_scope_cpu_dead_idle' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH rcu] cpu: __pcpu_scope_cpu_dead_idle can be static
2015-01-30 0:43 [rcu:rcu/dev 35/36] kernel/sched/idle.c:184:1: sparse: symbol '__pcpu_scope_cpu_dead_idle' was not declared. Should it be static? kbuild test robot
@ 2015-01-30 0:43 ` kbuild test robot
2015-01-30 0:52 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2015-01-30 0:43 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: kbuild-all, Ingo Molnar, Peter Zijlstra, linux-kernel
kernel/sched/idle.c:184:1: sparse: symbol '__pcpu_scope_cpu_dead_idle' was not declared. Should it be static?
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 42b5102..41354cd 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -181,7 +181,7 @@ exit_idle:
start_critical_timings();
}
-DEFINE_PER_CPU(bool, cpu_dead_idle);
+static DEFINE_PER_CPU(bool, cpu_dead_idle);
/*
* Generic idle loop implementation
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH rcu] cpu: __pcpu_scope_cpu_dead_idle can be static
2015-01-30 0:43 ` [PATCH rcu] cpu: __pcpu_scope_cpu_dead_idle can be static kbuild test robot
@ 2015-01-30 0:52 ` Paul E. McKenney
0 siblings, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2015-01-30 0:52 UTC (permalink / raw)
To: kbuild test robot; +Cc: kbuild-all, Ingo Molnar, Peter Zijlstra, linux-kernel
On Fri, Jan 30, 2015 at 08:43:07AM +0800, kbuild test robot wrote:
> kernel/sched/idle.c:184:1: sparse: symbol '__pcpu_scope_cpu_dead_idle' was not declared. Should it be static?
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
It cannot be static, as it is used in kernel/cpu.c. But it sounds like
sparse would be happier if the DECLARE_PER_CPU() was visible in
kernel/sched/idle.c. Which would allow the compiler to catch certain
kinds of typos, now that I think about it.
Or am I missing something here?
Thanx, Paul
> ---
> idle.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
> index 42b5102..41354cd 100644
> --- a/kernel/sched/idle.c
> +++ b/kernel/sched/idle.c
> @@ -181,7 +181,7 @@ exit_idle:
> start_critical_timings();
> }
>
> -DEFINE_PER_CPU(bool, cpu_dead_idle);
> +static DEFINE_PER_CPU(bool, cpu_dead_idle);
>
> /*
> * Generic idle loop implementation
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-30 0:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30 0:43 [rcu:rcu/dev 35/36] kernel/sched/idle.c:184:1: sparse: symbol '__pcpu_scope_cpu_dead_idle' was not declared. Should it be static? kbuild test robot
2015-01-30 0:43 ` [PATCH rcu] cpu: __pcpu_scope_cpu_dead_idle can be static kbuild test robot
2015-01-30 0:52 ` 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).