Re: [PATCH next/mmotm] slab: fix DEBUG_SLAB build

From: Hugh Dickins
Date: Tue Jul 12 2011 - 17:00:30 EST


On Tue, 12 Jul 2011, Christoph Lameter wrote:
> On Mon, 11 Jul 2011, Hugh Dickins wrote:
>
> > -#if ARCH_SLAB_MINALIGN
> > - if ((u32)objp & (ARCH_SLAB_MINALIGN-1)) {
> > + if ((unsigned long)objp & (ARCH_SLAB_MINALIGN-1)) {
> > printk(KERN_ERR "0x%p: not aligned to ARCH_SLAB_MINALIGN=%d\n",
>
> Change %d to %ul for consistencies sake and drop the cast of
> ARCH_SLAB_MINALIGN?

I don't think we can drop the cast of ARCH_SLAB_MINALIGN, or not without
a wander through all the architectures: it could well be defined as a bare
integer in some of them, even if the default definition as __alignof__
comes out as an unsigned long (which itself surprised me).

I could make it an unsigned long cast, and change the %d to %lu,
but there doesn't seem to be any real point to doing so.

Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/