public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] slqb: A not quite so trivial warning
@ 2009-11-06 11:29 Alan Cox
  2009-11-08 11:39 ` Pekka Enberg
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2009-11-06 11:29 UTC (permalink / raw)
  To: mel, penberg, linux-kernel

mm/slqb.c:2773: warning: initialization from incompatible pointer type

Variable scope...

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 mm/slqb.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/mm/slqb.c b/mm/slqb.c
index e745d9a..fddcf85 100644
--- a/mm/slqb.c
+++ b/mm/slqb.c
@@ -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));
 	}
 }


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] slqb: A not quite so trivial warning
  2009-11-06 11:29 [PATCH] slqb: A not quite so trivial warning Alan Cox
@ 2009-11-08 11:39 ` Pekka Enberg
  2009-11-08 11:58   ` Alan Cox
  2009-11-08 12:04   ` Tejun Heo
  0 siblings, 2 replies; 5+ messages in thread
From: Pekka Enberg @ 2009-11-08 11:39 UTC (permalink / raw)
  To: Alan Cox; +Cc: mel, linux-kernel, Nick Piggin, Tejun Heo

Hi Alan,

Alan Cox wrote:
> mm/slqb.c:2773: warning: initialization from incompatible pointer type
> 
> Variable scope...
> 
> Signed-off-by: Alan Cox <alan@linux.intel.com>

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

> ---
> 
>  mm/slqb.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> 
> diff --git a/mm/slqb.c b/mm/slqb.c
> index e745d9a..fddcf85 100644
> --- a/mm/slqb.c
> +++ b/mm/slqb.c
> @@ -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));
>  	}
>  }
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slqb: A not quite so trivial warning
  2009-11-08 11:39 ` Pekka Enberg
@ 2009-11-08 11:58   ` Alan Cox
  2009-11-08 12:04   ` Tejun Heo
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Cox @ 2009-11-08 11:58 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: Alan Cox, mel, linux-kernel, Nick Piggin, Tejun Heo

On Sun, 08 Nov 2009 13:39:13 +0200
Pekka Enberg <penberg@cs.helsinki.fi> wrote:

> Hi Alan,
> 
> Alan Cox wrote:
> > mm/slqb.c:2773: warning: initialization from incompatible pointer type
> > 
> > Variable scope...
> > 
> > Signed-off-by: Alan Cox <alan@linux.intel.com>
> 
> 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__"?

I see it from -next on an x86-32 build

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slqb: A not quite so trivial warning
  2009-11-08 11:39 ` Pekka Enberg
  2009-11-08 11:58   ` Alan Cox
@ 2009-11-08 12:04   ` Tejun Heo
  2009-11-08 12:29     ` Pekka Enberg
  1 sibling, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2009-11-08 12:04 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: Alan Cox, mel, linux-kernel, Nick Piggin

Hello,

Pekka Enberg wrote:
> Alan Cox wrote:
>> mm/slqb.c:2773: warning: initialization from incompatible pointer type
>>
>> Variable scope...
>>
>> Signed-off-by: Alan Cox <alan@linux.intel.com>
> 
> 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__"?

Yeap, the prefix is dropped in the latest percpu tree.  Patch already
pending.

  http://patchwork.kernel.org/patch/56948/

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] slqb: A not quite so trivial warning
  2009-11-08 12:04   ` Tejun Heo
@ 2009-11-08 12:29     ` Pekka Enberg
  0 siblings, 0 replies; 5+ messages in thread
From: Pekka Enberg @ 2009-11-08 12:29 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Alan Cox, Mel Gorman, linux-kernel, Nick Piggin

Tejun Heo wrote:
> Hello,
> 
> Pekka Enberg wrote:
>> Alan Cox wrote:
>>> mm/slqb.c:2773: warning: initialization from incompatible pointer type
>>>
>>> Variable scope...
>>>
>>> Signed-off-by: Alan Cox <alan@linux.intel.com>
>> 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__"?
> 
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-08 12:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-06 11:29 [PATCH] slqb: A not quite so trivial warning Alan Cox
2009-11-08 11:39 ` Pekka Enberg
2009-11-08 11:58   ` Alan Cox
2009-11-08 12:04   ` Tejun Heo
2009-11-08 12:29     ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox