* [PATCH] powerpc/eeh: fix pr_debug()s in eeh_cache.c
@ 2016-06-24 5:54 Andrew Donnellan
2016-06-24 6:21 ` Gavin Shan
2016-07-11 10:19 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Donnellan @ 2016-06-24 5:54 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Russell Currey, Gavin Shan
eeh_cache.c doesn't build cleanly with -DDEBUG when
CONFIG_PHYS_ADDR_T_64BIT is set, as a couple of pr_debug()s use "%lx" for
resource_size_t parameters.
Use "%pap" instead, as it's the correct format specifier for types deriving
from phys_addr_t.
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Cc: Russell Currey <ruscur@russell.cc>
Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
arch/powerpc/kernel/eeh_cache.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/eeh_cache.c b/arch/powerpc/kernel/eeh_cache.c
index ddbcfab..ceb81a4 100644
--- a/arch/powerpc/kernel/eeh_cache.c
+++ b/arch/powerpc/kernel/eeh_cache.c
@@ -114,9 +114,9 @@ static void eeh_addr_cache_print(struct pci_io_addr_cache *cache)
while (n) {
struct pci_io_addr_range *piar;
piar = rb_entry(n, struct pci_io_addr_range, rb_node);
- pr_debug("PCI: %s addr range %d [%lx-%lx]: %s\n",
+ pr_debug("PCI: %s addr range %d [%pap-%pap]: %s\n",
(piar->flags & IORESOURCE_IO) ? "i/o" : "mem", cnt,
- piar->addr_lo, piar->addr_hi, pci_name(piar->pcidev));
+ &piar->addr_lo, &piar->addr_hi, pci_name(piar->pcidev));
cnt++;
n = rb_next(n);
}
@@ -159,8 +159,8 @@ eeh_addr_cache_insert(struct pci_dev *dev, resource_size_t alo,
piar->flags = flags;
#ifdef DEBUG
- pr_debug("PIAR: insert range=[%lx:%lx] dev=%s\n",
- alo, ahi, pci_name(dev));
+ pr_debug("PIAR: insert range=[%pap:%pap] dev=%s\n",
+ &alo, &ahi, pci_name(dev));
#endif
rb_link_node(&piar->rb_node, parent, p);
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/eeh: fix pr_debug()s in eeh_cache.c
2016-06-24 5:54 [PATCH] powerpc/eeh: fix pr_debug()s in eeh_cache.c Andrew Donnellan
@ 2016-06-24 6:21 ` Gavin Shan
2016-07-11 10:19 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Gavin Shan @ 2016-06-24 6:21 UTC (permalink / raw)
To: Andrew Donnellan; +Cc: linuxppc-dev, Russell Currey, Gavin Shan
On Fri, Jun 24, 2016 at 03:54:22PM +1000, Andrew Donnellan wrote:
>eeh_cache.c doesn't build cleanly with -DDEBUG when
>CONFIG_PHYS_ADDR_T_64BIT is set, as a couple of pr_debug()s use "%lx" for
>resource_size_t parameters.
>
>Use "%pap" instead, as it's the correct format specifier for types deriving
>from phys_addr_t.
>
>Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
>Cc: Russell Currey <ruscur@russell.cc>
>Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>---
> arch/powerpc/kernel/eeh_cache.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/arch/powerpc/kernel/eeh_cache.c b/arch/powerpc/kernel/eeh_cache.c
>index ddbcfab..ceb81a4 100644
>--- a/arch/powerpc/kernel/eeh_cache.c
>+++ b/arch/powerpc/kernel/eeh_cache.c
>@@ -114,9 +114,9 @@ static void eeh_addr_cache_print(struct pci_io_addr_cache *cache)
> while (n) {
> struct pci_io_addr_range *piar;
> piar = rb_entry(n, struct pci_io_addr_range, rb_node);
>- pr_debug("PCI: %s addr range %d [%lx-%lx]: %s\n",
>+ pr_debug("PCI: %s addr range %d [%pap-%pap]: %s\n",
> (piar->flags & IORESOURCE_IO) ? "i/o" : "mem", cnt,
>- piar->addr_lo, piar->addr_hi, pci_name(piar->pcidev));
>+ &piar->addr_lo, &piar->addr_hi, pci_name(piar->pcidev));
> cnt++;
> n = rb_next(n);
> }
>@@ -159,8 +159,8 @@ eeh_addr_cache_insert(struct pci_dev *dev, resource_size_t alo,
> piar->flags = flags;
>
> #ifdef DEBUG
>- pr_debug("PIAR: insert range=[%lx:%lx] dev=%s\n",
>- alo, ahi, pci_name(dev));
>+ pr_debug("PIAR: insert range=[%pap:%pap] dev=%s\n",
>+ &alo, &ahi, pci_name(dev));
> #endif
>
> rb_link_node(&piar->rb_node, parent, p);
>--
>Andrew Donnellan OzLabs, ADL Canberra
>andrew.donnellan@au1.ibm.com IBM Australia Limited
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: powerpc/eeh: fix pr_debug()s in eeh_cache.c
2016-06-24 5:54 [PATCH] powerpc/eeh: fix pr_debug()s in eeh_cache.c Andrew Donnellan
2016-06-24 6:21 ` Gavin Shan
@ 2016-07-11 10:19 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2016-07-11 10:19 UTC (permalink / raw)
To: Andrew Donnellan, linuxppc-dev; +Cc: Gavin Shan
On Fri, 2016-24-06 at 05:54:22 UTC, Andrew Donnellan wrote:
> eeh_cache.c doesn't build cleanly with -DDEBUG when
> CONFIG_PHYS_ADDR_T_64BIT is set, as a couple of pr_debug()s use "%lx" for
> resource_size_t parameters.
>
> Use "%pap" instead, as it's the correct format specifier for types deriving
> from phys_addr_t.
>
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> Cc: Russell Currey <ruscur@russell.cc>
> Cc: Gavin Shan <gwshan@linux.vnet.ibm.com>
> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/91dc068202a61741a458232de7
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-11 10:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-24 5:54 [PATCH] powerpc/eeh: fix pr_debug()s in eeh_cache.c Andrew Donnellan
2016-06-24 6:21 ` Gavin Shan
2016-07-11 10:19 ` Michael Ellerman
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).