LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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: [PATCH] x86, ioremap: use %pR in printk
Date: Mon, 20 Oct 2008 09:12:03 +0200	[thread overview]
Message-ID: <20081020071203.GB12131@elte.hu> (raw)
In-Reply-To: <20081020040823.871BDDDDEC@ozlabs.org>


* Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> This converts things in drivers/pci to use %pR to printout the
> content of a struct resource instead of hand-casted %llx or
> other variants.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

cool!

 Acked-by: Ingo Molnar <mingo@elte.hu>

there's also two places in arch/x86/mm/ioremap.c that could use this 
straight away - see the (untested) patch below.

	Ingo

--------------------->
>From 3b4f8fd4ff54a2da035e972a610b8d5ac8d8eabb Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Mon, 20 Oct 2008 09:08:57 +0200
Subject: [PATCH] x86, ioremap: use %pR in printk

use the new %pR IO resource pointer/address/size printk type conversion
specifier.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/mm/ioremap.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index ae71e11..640c653 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -207,8 +207,8 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
 		return NULL;
 
 	if (!phys_addr_valid(phys_addr)) {
-		printk(KERN_WARNING "ioremap: invalid physical address %llx\n",
-		       (unsigned long long)phys_addr);
+		printk(KERN_WARNING "ioremap: invalid physical address %pR\n",
+		       phys_addr);
 		WARN_ON_ONCE(1);
 		return NULL;
 	}
@@ -267,9 +267,9 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
 		    (prot_val == _PAGE_CACHE_WC &&
 		     new_prot_val == _PAGE_CACHE_WB)) {
 			pr_debug(
-		"ioremap error for 0x%llx-0x%llx, requested 0x%lx, got 0x%lx\n",
-				(unsigned long long)phys_addr,
-				(unsigned long long)(phys_addr + size),
+		"ioremap error for %pR-%pR, requested 0x%lx, got 0x%lx\n",
+				phys_addr,
+				phys_addr + size,
 				prot_val, new_prot_val);
 			free_memtype(phys_addr, phys_addr + size);
 			return NULL;

  reply	other threads:[~2008-10-20  7:12 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 ` Ingo Molnar [this message]
2008-10-20  8:34   ` [PATCH] x86, ioremap: use %pR in printk 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
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=20081020071203.GB12131@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --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).