mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH next/mmotm] slab: fix DEBUG_SLAB build
Date: Wed, 13 Jul 2011 08:59:05 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.00.1107130852590.6020@sister.anvils> (raw)
In-Reply-To: <alpine.DEB.2.00.1107131037480.29034@router.home>

On Wed, 13 Jul 2011, Christoph Lameter wrote:
> On Tue, 12 Jul 2011, Hugh Dickins wrote:
> > 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).
> 
> A bare integer can be handled by a %lu in a printk without the need for a
> cast.

Really?  Here if I try that on x86_64 with #define ARCH_SLAB_MINALIGN 8, I get
mm/slab.c: In function `cache_alloc_debugcheck_after':
mm/slab.c:3160:10: warning: format `%lu' expects type `long unsigned int', but argument 3 has type `int'

Hugh

  reply	other threads:[~2011-07-13 15:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-11 18:56 Hugh Dickins
2011-07-11 20:35 ` Hugh Dickins
2011-07-12 15:45 ` Christoph Lameter
2011-07-12 21:00   ` Hugh Dickins
2011-07-13 15:39     ` Christoph Lameter
2011-07-13 15:59       ` Hugh Dickins [this message]
2011-07-13 16:07         ` Christoph Lameter
2011-07-13 16:08 ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.00.1107130852590.6020@sister.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®