slqb: A not quite so trivial warning
PATCH 1/1 slqb: A not quite so trivial warning
mm/slqb.c:2773: warning: initialization from incompatible pointer type
Variable scope...
---
mm/slqb.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
mm/slqb.c +4 -4
@@ -2770,16 +2770,16 @@ static DEFINE_PER_CPU(struct delayed_work, cache_trim_work);static void __cpuinit start_cpu_timer (int cpu) { -struct delayed_work *cache_trim_work = &per_cpu (cache_trim_work, cpu); +struct delayed_work *lcache_trim_work = &per_cpu (cache_trim_work, cpu);/* * When this gets called from do_initcalls via cpucache_init(), * init_workqueues() has already run, so keventd will be setup * at that time. */ -if (keventd_up () && cache_trim_work->work.func ==NULL ) { -INIT_DELAYED_WORK (cache_trim_work, cache_trim_worker); -schedule_delayed_work_on (cpu, cache_trim_work, +if (keventd_up () && lcache_trim_work->work.func ==NULL ) { +INIT_DELAYED_WORK (lcache_trim_work, cache_trim_worker); +schedule_delayed_work_on (cpu, lcache_trim_work,__round_jiffies_relative (HZ , cpu)); } }
Hi Alan,
Quoted 5 lines · Alan Cox
mm/slqb.c:2773: warning: initialization from incompatible pointer typeVariable scope...
Signed-off-by Alan Cox <[email protected]>
I don't see this warning in my tree. Is this coming from linux-next? Did someone change DEFINE_PER_CPU not to prefix the variable name with "per_cpu__"?
Pekka
Quoted 32 lines
---
mm/slqb.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)mm/slqb.c +4
-4@@ -2770,16 +2770,16 @@ static DEFINE_PER_CPU(struct delayed_work, cache_trim_work);static void __cpuinit start_cpu_timer (int cpu) { -struct delayed_work *cache_trim_work = &per_cpu (cache_trim_work, cpu); +struct delayed_work *lcache_trim_work = &per_cpu (cache_trim_work, cpu);/* * When this gets called from do_initcalls via cpucache_init(), * init_workqueues() has already run, so keventd will be setup * at that time. */ -if (keventd_up () && cache_trim_work->work.func ==NULL ) { -INIT_DELAYED_WORK (cache_trim_work, cache_trim_worker); -schedule_delayed_work_on (cpu, cache_trim_work, +if (keventd_up () && lcache_trim_work->work.func ==NULL ) { +INIT_DELAYED_WORK (lcache_trim_work, cache_trim_worker); +schedule_delayed_work_on (cpu, lcache_trim_work,__round_jiffies_relative (HZ , cpu)); } }
Quoted 5 lines · On Sun, 08 Nov 2009 13:39:13 +0200 Pekka Enberg <[email protected]> wrote:
Hi Alan,
Quoted 2 lines · Alan Cox
mm/slqb.c:2773: warning: initialization from incompatible pointer type
Quoted 7 lines
Quoted 3 lines
Variable scope...
Signed-off-by Alan Cox <[email protected]>I don't see this warning in my tree. Is this coming from linux-next? Did someone change
DEFINE_PER_CPUnot to prefix the variable name with "per_cpu__"?
I see it from -next on an x86-32 build
Hello,
Quoted 10 lines · Pekka Enberg
Quoted 5 lines · Alan Cox
mm/slqb.c:2773: warning: initialization from incompatible pointer typeVariable scope...
Signed-off-by Alan Cox <[email protected]>I don't see this warning in my tree. Is this coming from linux-next? Did someone change
DEFINE_PER_CPUnot to prefix the variable name with "per_cpu__"?
Yeap, the prefix is dropped in the latest percpu tree. Patch already pending.
http://patchwork.kernel.org/patch/56948/
Thanks.
Signature · 1 line
tejun
Quoted 13 lines · Tejun Heo
Hello,
Quoted 9 lines · Pekka Enberg
Quoted 5 lines · Alan Cox
mm/slqb.c:2773: warning: initialization from incompatible pointer typeVariable scope...
Signed-off-by Alan Cox <[email protected]>I don't see this warning in my tree. Is this coming from linux-next? Did someone change
DEFINE_PER_CPUnot to prefix the variable name with "per_cpu__"?
Quoted 6 lines
Yeap, the prefix is dropped in the latest percpu tree. Patch already pending.
http://patchwork.kernel.org/patch/56948/
Thanks.
OK, I applied the above patch. Please CC me on patches that have the magic letters S, L, and B in the future.
Pekka