LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org, David Miller <davem@davemloft.net>,
	linux-pci@vger.kernel.org, yhlu.kernel@gmail.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: [PATCH] x86, ioremap: use %pR in printk
Date: Mon, 20 Oct 2008 22:22:48 +1100	[thread overview]
Message-ID: <1224501768.7654.144.camel@pasglop> (raw)
In-Reply-To: <1224501352.7654.141.camel@pasglop>

On Mon, 2008-10-20 at 22:15 +1100, Benjamin Herrenschmidt wrote:
> > so how about something like the two patches below (ontop of Linus's 
> > patch): the first patch introduces a "small" resource pointer printout 
> > format: %pr - the little brother of %pR.
> > 
> > The output format is [0x00001234] - minimum width is 8.
> > 
> > The second patch takes advantage of it in ioremap.c.
> 
> Well, I did the exact same patch except I used the same function
> and just added a flag for "R" vs. "r". However, I didn't post it
> because I wasn't too happy with passing by pointer and I wasn't
> sure whether we wanted to keep the letter after p uppercase or not... In
> any case, I kept it as a thing to discuss after the first one goes in.
> 
> At this stage, I'm tempted to go for a %pP for printing a pointer to
> a phys_addr_t (and that's the same as resource_size_t, just more generic
> nowadays, since those were consolidated).
> 
> Still not too happy with the pointer thing but that's the best we can
> do I suppose without losing gcc type checking.

Oh, and I didn't like having the brackets around something that isn't
a range too but that's a minor details.

Ben.



  reply	other threads:[~2008-10-20 11:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-20  4:07 [PATCH 2/2] pci: Use new %pR to print resource ranges Benjamin Herrenschmidt
2008-10-20  7:12 ` [PATCH] x86, ioremap: use %pR in printk Ingo Molnar
2008-10-20  8:34   ` Benjamin Herrenschmidt
2008-10-20  9:05     ` Ingo Molnar
2008-10-20 11:00       ` Ingo Molnar
2008-10-20 11:15         ` Benjamin Herrenschmidt
2008-10-20 11:22           ` Benjamin Herrenschmidt [this message]
2008-10-20 11:31             ` Ingo Molnar
2008-10-20 11:36               ` Ingo Molnar
2008-10-20 12:58                 ` Johannes Berg
2008-10-20 13:15                   ` Ingo Molnar
2008-10-20 21:35                   ` Benjamin Herrenschmidt
2008-10-21  6:47                     ` Johannes Berg
2008-10-20 13:04                 ` Matthew Wilcox
2008-10-20 21:33                 ` Benjamin Herrenschmidt
2008-10-20 21:34                 ` Benjamin Herrenschmidt
2008-10-20 11:30           ` Ingo Molnar

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=1224501768.7654.144.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@osdl.org \
    --cc=yhlu.kernel@gmail.com \
    --subject='Re: [PATCH] x86, ioremap: use %pR in printk' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).