* linux-next: slab tree build warning
@ 2009-02-04 7:38 Stephen Rothwell
2009-02-04 8:11 ` Pekka J Enberg
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2009-02-04 7:38 UTC (permalink / raw)
To: Pekka Enberg, Christoph Lameter; +Cc: linux-next, Nick Piggin
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
Hi all,
Today's linux-next build (powerpc allnoconfig) produced this warning:
mm/slqb.c: In function 'kmem_cache_open':
mm/slqb.c:2180: warning: label 'error_lock' defined but not used
mm/slqb.c:2176: warning: label 'error_cpu_array' defined but not used
Caused by commit 8b9ffd9d52479bd17b5729c9f3acaefa90c7e585 ("slqb: dynamic
array allocations").
Clearly neither CONFIG_SMP not CONFIG_NUMA is set.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: slab tree build warning
2009-02-04 7:38 linux-next: slab tree build warning Stephen Rothwell
@ 2009-02-04 8:11 ` Pekka J Enberg
2009-02-06 8:58 ` Pekka Enberg
0 siblings, 1 reply; 4+ messages in thread
From: Pekka J Enberg @ 2009-02-04 8:11 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Christoph Lameter, linux-next, Nick Piggin
On Wed, 4 Feb 2009, Stephen Rothwell wrote:
> Today's linux-next build (powerpc allnoconfig) produced this warning:
>
> mm/slqb.c: In function 'kmem_cache_open':
> mm/slqb.c:2180: warning: label 'error_lock' defined but not used
> mm/slqb.c:2176: warning: label 'error_cpu_array' defined but not used
>
> Caused by commit 8b9ffd9d52479bd17b5729c9f3acaefa90c7e585 ("slqb: dynamic
> array allocations").
>
> Clearly neither CONFIG_SMP not CONFIG_NUMA is set.
Here's a simple fix for it. It would probably be better to get rid of the
#ifdefs in kmem_cache_open() with empty static inlines for the
!CONFIG_SMP and !CONFIG_NUMA cases.
Nick, I did not apply this patch yet so ACK/NAK, please.
Pekka
>From 2e58614cfdc0a823af7e73b4f3f979817cdba465 Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@cs.helsinki.fi>
Date: Wed, 4 Feb 2009 10:06:14 +0200
Subject: [PATCH] SLQB: Fix compile warnings on UMA and UP
As reported by Stephen Rothwell:
Today's linux-next build (powerpc allnoconfig) produced this warning:
mm/slqb.c: In function 'kmem_cache_open':
mm/slqb.c:2180: warning: label 'error_lock' defined but not used
mm/slqb.c:2176: warning: label 'error_cpu_array' defined but not used
Caused by commit 8b9ffd9d52479bd17b5729c9f3acaefa90c7e585 ("slqb: dynamic
array allocations").
Clearly neither CONFIG_SMP not CONFIG_NUMA is set.
Fix those up by wrapping the labes in ifdef CONFIG_SMP and CONFIG_NUMA where
appropriate.
Cc: Nick Piggin <npiggin@suse.de>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
mm/slqb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/slqb.c b/mm/slqb.c
index 4352dad..07bf5b3 100644
--- a/mm/slqb.c
+++ b/mm/slqb.c
@@ -2172,12 +2172,12 @@ error_nodes:
error_node_array:
#ifdef CONFIG_NUMA
kmem_cache_dyn_array_free(s->node_slab);
-#endif
error_cpu_array:
+#endif
#ifdef CONFIG_SMP
kmem_cache_dyn_array_free(s->cpu_slab);
-#endif
error_lock:
+#endif
up_write(&slqb_lock);
error:
if (flags & SLAB_PANIC)
--
1.5.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: linux-next: slab tree build warning
2009-02-04 8:11 ` Pekka J Enberg
@ 2009-02-06 8:58 ` Pekka Enberg
0 siblings, 0 replies; 4+ messages in thread
From: Pekka Enberg @ 2009-02-06 8:58 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Christoph Lameter, linux-next, Nick Piggin
On Wed, 2009-02-04 at 10:11 +0200, Pekka J Enberg wrote:
> On Wed, 4 Feb 2009, Stephen Rothwell wrote:
> > Today's linux-next build (powerpc allnoconfig) produced this warning:
> >
> > mm/slqb.c: In function 'kmem_cache_open':
> > mm/slqb.c:2180: warning: label 'error_lock' defined but not used
> > mm/slqb.c:2176: warning: label 'error_cpu_array' defined but not used
> >
> > Caused by commit 8b9ffd9d52479bd17b5729c9f3acaefa90c7e585 ("slqb: dynamic
> > array allocations").
> >
> > Clearly neither CONFIG_SMP not CONFIG_NUMA is set.
>
> Here's a simple fix for it. It would probably be better to get rid of the
> #ifdefs in kmem_cache_open() with empty static inlines for the
> !CONFIG_SMP and !CONFIG_NUMA cases.
>
> Nick, I did not apply this patch yet so ACK/NAK, please.
I went ahead and merged my patch.
Pekka
^ permalink raw reply [flat|nested] 4+ messages in thread
* linux-next: slab tree build warning
@ 2009-03-04 6:35 Stephen Rothwell
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2009-03-04 6:35 UTC (permalink / raw)
To: Pekka Enberg, Christoph Lameter; +Cc: linux-next, Nick Piggin
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
Hi all,
Today's linux-next build (powerpc allnoconfig) produced this warning:
mm/slqb.c:3122: warning: 'gather_stats' defined but not used
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-04 6:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-04 7:38 linux-next: slab tree build warning Stephen Rothwell
2009-02-04 8:11 ` Pekka J Enberg
2009-02-06 8:58 ` Pekka Enberg
-- strict thread matches above, loose matches on Subject: below --
2009-03-04 6:35 Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox