]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
slab: fix DEBUG==0 warning
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 13 Sep 2012 00:58:25 +0000 (10:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 17 Sep 2012 10:36:38 +0000 (20:36 +1000)
mm/slab.c:808: warning: '__slab_error' defined but not used

Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/slab.c

index 0a6b5671dd96517faf26f615e128375ca55f7cf9..a23b70ff38cb65c3d9d6de3539a93aa0b03756d5 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -803,6 +803,7 @@ static void cache_estimate(unsigned long gfporder, size_t buffer_size,
        *left_over = slab_size - nr_objs*buffer_size - mgmt_size;
 }
 
+#if DEBUG
 #define slab_error(cachep, msg) __slab_error(__func__, cachep, msg)
 
 static void __slab_error(const char *function, struct kmem_cache *cachep,
@@ -812,6 +813,7 @@ static void __slab_error(const char *function, struct kmem_cache *cachep,
               function, cachep->name, msg);
        dump_stack();
 }
+#endif
 
 /*
  * By default on NUMA we use alien caches to stage the freeing of