diff options
author | Christoph Lameter <cl@linux.com> | 2012-09-11 15:49:38 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-09-19 02:58:06 -0400 |
commit | f28510d30c7f03daa290019fbc57ad8277347614 (patch) | |
tree | aea777471b79ab19a508155fd69e3b4d2a5cc97c /mm/slab.c | |
parent | 9df53b154ac712c87db1170057aa6df05eb7bdbd (diff) |
slab: Only define slab_error for DEBUG
On Tue, 11 Sep 2012, Stephen Rothwell wrote:
> After merging the final tree, today's linux-next build (sparc64 defconfig)
> produced this warning:
>
> mm/slab.c:808:13: warning: '__slab_error' defined but not used [-Wunused-function]
>
> Introduced by commit 945cf2b6199b ("mm/sl[aou]b: Extract a common
> function for kmem_cache_destroy"). All uses of slab_error() are now
> guarded by DEBUG.
There is no use case left for slab builds without DEBUG.
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -803,6 +803,7 @@ static void cache_estimate(unsigned long gfporder, size_t buffer_size, | |||
803 | *left_over = slab_size - nr_objs*buffer_size - mgmt_size; | 803 | *left_over = slab_size - nr_objs*buffer_size - mgmt_size; |
804 | } | 804 | } |
805 | 805 | ||
806 | #if DEBUG | ||
806 | #define slab_error(cachep, msg) __slab_error(__func__, cachep, msg) | 807 | #define slab_error(cachep, msg) __slab_error(__func__, cachep, msg) |
807 | 808 | ||
808 | static void __slab_error(const char *function, struct kmem_cache *cachep, | 809 | 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, | |||
812 | function, cachep->name, msg); | 813 | function, cachep->name, msg); |
813 | dump_stack(); | 814 | dump_stack(); |
814 | } | 815 | } |
816 | #endif | ||
815 | 817 | ||
816 | /* | 818 | /* |
817 | * By default on NUMA we use alien caches to stage the freeing of | 819 | * By default on NUMA we use alien caches to stage the freeing of |