From: Tetsuo Handa Date: Thu, 21 Jul 2011 00:42:45 +0000 (+0900) Subject: slab: fix DEBUG_SLAB warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7ea466f2256b02a7047dfd47d76a2f6c1e427e3e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Pekka Enberg --- diff --git a/mm/slab.c b/mm/slab.c index c3cb3598555a..dc2f068c0b7d 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3155,7 +3155,8 @@ static void *cache_alloc_debugcheck_after(struct kmem_cache *cachep, objp += obj_offset(cachep); if (cachep->ctor && cachep->flags & SLAB_POISON) cachep->ctor(objp); - if ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1)) { + if (ARCH_SLAB_MINALIGN && + ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1))) { printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n", objp, (int)ARCH_SLAB_MINALIGN); }