diff options
author | Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> | 2011-07-20 20:42:45 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2011-07-22 04:01:03 -0400 |
commit | 7ea466f2256b02a7047dfd47d76a2f6c1e427e3e (patch) | |
tree | fbe47a3e126d3f20b0eb4785eaaced80e95b987e | |
parent | b56efcf0a45aa7fc32de90d5f9838541082fbc19 (diff) |
slab: fix DEBUG_SLAB warning
In commit c225150b "slab: fix DEBUG_SLAB build",
"if ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1))" is always true if
ARCH_SLAB_MINALIGN == 0. Do not print warning if ARCH_SLAB_MINALIGN == 0.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | mm/slab.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3155,7 +3155,8 @@ static void *cache_alloc_debugcheck_after(struct kmem_cache *cachep, | |||
3155 | objp += obj_offset(cachep); | 3155 | objp += obj_offset(cachep); |
3156 | if (cachep->ctor && cachep->flags & SLAB_POISON) | 3156 | if (cachep->ctor && cachep->flags & SLAB_POISON) |
3157 | cachep->ctor(objp); | 3157 | cachep->ctor(objp); |
3158 | if ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1)) { | 3158 | if (ARCH_SLAB_MINALIGN && |
3159 | ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1))) { | ||
3159 | printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n", | 3160 | printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n", |
3160 | objp, (int)ARCH_SLAB_MINALIGN); | 3161 | objp, (int)ARCH_SLAB_MINALIGN); |
3161 | } | 3162 | } |