linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: hugh@veritas.com, linux-mm@kvack.org, ak@suse.de
Subject: Re: [patch] kill off ARCH_HAS_ATOMIC_UNSIGNED (take 2)
Date: Fri, 17 Dec 2004 15:54:43 -0800	[thread overview]
Message-ID: <20041217155443.0a370ed7.pj@sgi.com> (raw)
In-Reply-To: <1103308048.4450.123.camel@localhost>

Dave wrote:
>  	printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
> -		(int)(2*sizeof(page_flags_t)), (unsigned long)page->flags,
> +		(int)(2*sizeof(unsigned long)), page->flags,
>  		page->mapping, page_mapcount(page), page_count(page));

I've a slight preference for:

	printk(KERN_EMERG "flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
		(int)(2*sizeof(page->flags)), page->flags,
		page->mapping, page_mapcount(page), page_count(page));

or perhaps even a little better:

	printk(KERN_EMERG "flags:0x%08lx mapping:%p mapcount:%d count:%d\n",
				page->flags, page->mapping,
				page_mapcount(page), page_count(page));

Most plain unsigned longs are displayed with some variant of %8lx, not a
%*lx variable sized format.  And in general, the plainer the code, the
quicker the reader can understand it.

But if you don't find my nit picking both pleasing and convenient, don't
hesitate to dismiss it.  It's no biggie, and my comment is just a drive
by shooting so has little standing.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.650.933.1373, 1.925.600.0401
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

      parent reply	other threads:[~2004-12-17 23:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-17 17:26 Dave Hansen
2004-12-17 18:17 ` Hugh Dickins
2004-12-17 18:27   ` Dave Hansen
2004-12-17 18:38     ` Hugh Dickins
2004-12-17 23:54     ` Paul Jackson [this message]

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=20041217155443.0a370ed7.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=ak@suse.de \
    --cc=haveblue@us.ibm.com \
    --cc=hugh@veritas.com \
    --cc=linux-mm@kvack.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