2010-11-12 21:38:15

by Joe Perches

[permalink] [raw]
Subject: [PATCH 00/14] Use printf extension %pR for struct resource

Yet more trivia...

Joe Perches (14):
arch/frv: Use printf extension %pR for struct resource
arch/mips: Use printf extension %pR for struct resource
arch/powerpc: Use printf extension %pR for struct resource
drivers/dma/ppc4xx: Use printf extension %pR for struct resource
drivers/infiniband: Use printf extension %pR for struct resource
drivers/mfd: Use printf extension %pR for struct resource
drivers/mtd/maps: Use printf extension %pR for struct resource
drivers/mtd/nand: Use printf extension %pR for struct resource
drivers/net/can/sja1000: Use printf extension %pR for struct resource
drivers/parisc: Use printf extension %pR for struct resource
drivers/rapidio: Use printf extension %pR for struct resource
drivers/uwb: Use printf extension %pR for struct resource
drivers/video: Use printf extension %pR for struct resource
sound/ppc: Use printf extension %pR for struct resource

arch/frv/mb93090-mb00/pci-vdk.c | 8 ++------
arch/mips/txx9/generic/pci.c | 7 ++-----
arch/powerpc/kernel/pci_64.c | 3 +--
arch/powerpc/sysdev/tsi108_dev.c | 8 ++++----
drivers/dma/ppc4xx/adma.c | 5 ++---
drivers/infiniband/hw/ipath/ipath_driver.c | 5 ++---
drivers/mfd/sm501.c | 7 ++-----
drivers/mtd/maps/amd76xrom.c | 7 ++-----
drivers/mtd/maps/ck804xrom.c | 7 ++-----
drivers/mtd/maps/esb2rom.c | 9 +++------
drivers/mtd/maps/ichxrom.c | 9 +++------
drivers/mtd/maps/physmap_of.c | 4 +---
drivers/mtd/maps/scx200_docflash.c | 5 ++---
drivers/mtd/nand/pasemi_nand.c | 2 +-
drivers/net/can/sja1000/sja1000_of_platform.c | 8 ++------
drivers/parisc/dino.c | 13 +++++--------
drivers/parisc/hppb.c | 6 ++----
drivers/rapidio/rio.c | 4 ++--
drivers/uwb/umc-dev.c | 7 ++-----
drivers/video/platinumfb.c | 8 ++------
sound/ppc/pmac.c | 12 ++++--------
21 files changed, 48 insertions(+), 96 deletions(-)

--
1.7.3.1.g432b3.dirty


2010-11-12 21:38:25

by Joe Perches

[permalink] [raw]
Subject: [PATCH 12/14] drivers/uwb: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/uwb/umc-dev.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/uwb/umc-dev.c b/drivers/uwb/umc-dev.c
index 43ea998..ccd2184 100644
--- a/drivers/uwb/umc-dev.c
+++ b/drivers/uwb/umc-dev.c
@@ -54,11 +54,8 @@ int umc_device_register(struct umc_dev *umc)

err = request_resource(umc->resource.parent, &umc->resource);
if (err < 0) {
- dev_err(&umc->dev, "can't allocate resource range "
- "%016Lx to %016Lx: %d\n",
- (unsigned long long)umc->resource.start,
- (unsigned long long)umc->resource.end,
- err);
+ dev_err(&umc->dev, "can't allocate resource range %pR: %d\n",
+ &umc->resource, err);
goto error_request_resource;
}

--
1.7.3.1.g432b3.dirty

2010-11-12 21:38:20

by Joe Perches

[permalink] [raw]
Subject: [PATCH 03/14] arch/powerpc: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
arch/powerpc/kernel/pci_64.c | 3 +--
arch/powerpc/sysdev/tsi108_dev.c | 8 ++++----
2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index d43fc65..2ecb1de 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -193,8 +193,7 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
hose->io_resource.start += io_virt_offset;
hose->io_resource.end += io_virt_offset;

- pr_debug(" hose->io_resource=0x%016llx...0x%016llx\n",
- hose->io_resource.start, hose->io_resource.end);
+ pr_debug(" hose->io_resource=%pR\n", &hose->io_resource.start);

return 0;
}
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c
index d4d15aa..5e249a8 100644
--- a/arch/powerpc/sysdev/tsi108_dev.c
+++ b/arch/powerpc/sysdev/tsi108_dev.c
@@ -83,8 +83,8 @@ static int __init tsi108_eth_of_init(void)
memset(&tsi_eth_data, 0, sizeof(tsi_eth_data));

ret = of_address_to_resource(np, 0, &r[0]);
- DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n",
- __func__,r[0].name, r[0].start, r[0].end);
+ DBG("%s: name:start->end = %s:%pR\n",
+ __func__, r[0].name, &r[0]);
if (ret)
goto err;

@@ -92,8 +92,8 @@ static int __init tsi108_eth_of_init(void)
r[1].start = irq_of_parse_and_map(np, 0);
r[1].end = irq_of_parse_and_map(np, 0);
r[1].flags = IORESOURCE_IRQ;
- DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n",
- __func__,r[1].name, r[1].start, r[1].end);
+ DBG("%s: name:start->end = %s:%pR\n",
+ __func__, r[1].name, &r[1]);

tsi_eth_dev =
platform_device_register_simple("tsi-ethernet", i++, &r[0],
--
1.7.3.1.g432b3.dirty

2010-11-12 21:38:23

by Joe Perches

[permalink] [raw]
Subject: [PATCH 05/14] drivers/infiniband: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/infiniband/hw/ipath/ipath_driver.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index 765f0fc..b33f045 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -530,9 +530,8 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
for (j = 0; j < 6; j++) {
if (!pdev->resource[j].start)
continue;
- ipath_cdbg(VERBOSE, "BAR %d start %llx, end %llx, len %llx\n",
- j, (unsigned long long)pdev->resource[j].start,
- (unsigned long long)pdev->resource[j].end,
+ ipath_cdbg(VERBOSE, "BAR %d %pR, len %llx\n",
+ j, &pdev->resource[j],
(unsigned long long)pci_resource_len(pdev, j));
}

--
1.7.3.1.g432b3.dirty

2010-11-12 21:38:18

by Joe Perches

[permalink] [raw]
Subject: [PATCH 02/14] arch/mips: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
arch/mips/txx9/generic/pci.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c
index 9a0be81..c609e7b 100644
--- a/arch/mips/txx9/generic/pci.c
+++ b/arch/mips/txx9/generic/pci.c
@@ -213,11 +213,8 @@ txx9_alloc_pci_controller(struct pci_controller *pcic,

pcic->mem_offset = 0; /* busaddr == physaddr */

- printk(KERN_INFO "PCI: IO 0x%08llx-0x%08llx MEM 0x%08llx-0x%08llx\n",
- (unsigned long long)pcic->mem_resource[1].start,
- (unsigned long long)pcic->mem_resource[1].end,
- (unsigned long long)pcic->mem_resource[0].start,
- (unsigned long long)pcic->mem_resource[0].end);
+ printk(KERN_INFO "PCI: IO %pR MEM %pR\n",
+ &pcic->mem_resource[1], &pcic->mem_resource[0]);

/* register_pci_controller() will request MEM resource */
release_resource(&pcic->mem_resource[0]);
--
1.7.3.1.g432b3.dirty

2010-11-12 21:39:00

by Joe Perches

[permalink] [raw]
Subject: [PATCH 13/14] drivers/video: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/video/platinumfb.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
index a50e197..cfe3c79 100644
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -557,12 +557,8 @@ static int __devinit platinumfb_probe(struct platform_device* odev,
framebuffer_release(info);
return -ENXIO;
}
- dev_dbg(&odev->dev, " registers : 0x%llx...0x%llx\n",
- (unsigned long long)pinfo->rsrc_reg.start,
- (unsigned long long)pinfo->rsrc_reg.end);
- dev_dbg(&odev->dev, " framebuffer: 0x%llx...0x%llx\n",
- (unsigned long long)pinfo->rsrc_fb.start,
- (unsigned long long)pinfo->rsrc_fb.end);
+ dev_dbg(&odev->dev, " registers : %pR\n", &pinfo->rsrc_reg);
+ dev_dbg(&odev->dev, " framebuffer: %pR\n", &pinfo->rsrc_fb);

/* Do not try to request register space, they overlap with the
* northbridge and that can fail. Only request framebuffer
--
1.7.3.1.g432b3.dirty

2010-11-12 21:38:48

by Joe Perches

[permalink] [raw]
Subject: [PATCH 14/14] sound/ppc: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
sound/ppc/pmac.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 8508117..b47cfd4 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -1228,10 +1228,8 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
chip->rsrc[i].start + 1,
rnames[i]) == NULL) {
printk(KERN_ERR "snd: can't request rsrc "
- " %d (%s: 0x%016llx:%016llx)\n",
- i, rnames[i],
- (unsigned long long)chip->rsrc[i].start,
- (unsigned long long)chip->rsrc[i].end);
+ " %d (%s: %pR)\n",
+ i, rnames[i], &chip->rsrc[i]);
err = -ENODEV;
goto __error;
}
@@ -1256,10 +1254,8 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
chip->rsrc[i].start + 1,
rnames[i]) == NULL) {
printk(KERN_ERR "snd: can't request rsrc "
- " %d (%s: 0x%016llx:%016llx)\n",
- i, rnames[i],
- (unsigned long long)chip->rsrc[i].start,
- (unsigned long long)chip->rsrc[i].end);
+ " %d (%s: %pR)\n",
+ i, rnames[i], &chip->rsrc[i]);
err = -ENODEV;
goto __error;
}
--
1.7.3.1.g432b3.dirty

2010-11-12 21:39:03

by Joe Perches

[permalink] [raw]
Subject: [PATCH 11/14] drivers/rapidio: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/rapidio/rio.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index 7b5080c..5b7facd 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -1162,8 +1162,8 @@ int __devinit rio_init_mports(void)
resource_size(&port->iores),
port->name)) {
printk(KERN_ERR
- "RIO: Error requesting master port region 0x%016llx-0x%016llx\n",
- (u64)port->iores.start, (u64)port->iores.end);
+ "RIO: Error requesting master port region %pR\n",
+ &port->iores);
rc = -ENOMEM;
goto out;
}
--
1.7.3.1.g432b3.dirty

2010-11-12 21:39:33

by Joe Perches

[permalink] [raw]
Subject: [PATCH 09/14] drivers/net/can/sja1000: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/net/can/sja1000/sja1000_of_platform.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c
index 5bfccfd..09c3e9d 100644
--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -107,17 +107,13 @@ static int __devinit sja1000_ofp_probe(struct platform_device *ofdev,
res_size = resource_size(&res);

if (!request_mem_region(res.start, res_size, DRV_NAME)) {
- dev_err(&ofdev->dev, "couldn't request %#llx..%#llx\n",
- (unsigned long long)res.start,
- (unsigned long long)res.end);
+ dev_err(&ofdev->dev, "couldn't request %pR\n", &res);
return -EBUSY;
}

base = ioremap_nocache(res.start, res_size);
if (!base) {
- dev_err(&ofdev->dev, "couldn't ioremap %#llx..%#llx\n",
- (unsigned long long)res.start,
- (unsigned long long)res.end);
+ dev_err(&ofdev->dev, "couldn't ioremap %pR\n", &res);
err = -ENOMEM;
goto exit_release_mem;
}
--
1.7.3.1.g432b3.dirty

2010-11-12 21:39:35

by Joe Perches

[permalink] [raw]
Subject: [PATCH 08/14] drivers/mtd/nand: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/mtd/nand/pasemi_nand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c
index 6ddb246..bb277a5 100644
--- a/drivers/mtd/nand/pasemi_nand.c
+++ b/drivers/mtd/nand/pasemi_nand.c
@@ -107,7 +107,7 @@ static int __devinit pasemi_nand_probe(struct platform_device *ofdev,
if (pasemi_nand_mtd)
return -ENODEV;

- pr_debug("pasemi_nand at %llx-%llx\n", res.start, res.end);
+ pr_debug("pasemi_nand at %pR\n", &res);

/* Allocate memory for MTD device structure and private data */
pasemi_nand_mtd = kzalloc(sizeof(struct mtd_info) +
--
1.7.3.1.g432b3.dirty

2010-11-12 21:39:31

by Joe Perches

[permalink] [raw]
Subject: [PATCH 10/14] drivers/parisc: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/parisc/dino.c | 13 +++++--------
drivers/parisc/hppb.c | 6 ++----
2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index d9f5148..d30a809 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -599,15 +599,13 @@ dino_fixup_bus(struct pci_bus *bus)

}

- DBG("DEBUG %s assigning %d [0x%lx,0x%lx]\n",
+ DBG("DEBUG %s assigning %d [%pR]\n",
dev_name(&bus->self->dev), i,
- bus->self->resource[i].start,
- bus->self->resource[i].end);
+ &bus->self->resource[i]);
WARN_ON(pci_assign_resource(bus->self, i));
- DBG("DEBUG %s after assign %d [0x%lx,0x%lx]\n",
+ DBG("DEBUG %s after assign %d [%pR]\n",
dev_name(&bus->self->dev), i,
- bus->self->resource[i].start,
- bus->self->resource[i].end);
+ &bus->self->resource[i]);
}
}

@@ -809,8 +807,7 @@ dino_bridge_init(struct dino_device *dino_dev, const char *name)
result = ccio_request_resource(dino_dev->hba.dev, &res[i]);
if (result < 0) {
printk(KERN_ERR "%s: failed to claim PCI Bus address "
- "space %d (0x%lx-0x%lx)!\n", name, i,
- (unsigned long)res[i].start, (unsigned long)res[i].end);
+ "space %d (%pR)!\n", name, i, &res[i]);
return result;
}
}
diff --git a/drivers/parisc/hppb.c b/drivers/parisc/hppb.c
index 815db17..898208e 100644
--- a/drivers/parisc/hppb.c
+++ b/drivers/parisc/hppb.c
@@ -74,10 +74,8 @@ static int hppb_probe(struct parisc_device *dev)

status = ccio_request_resource(dev, &card->mmio_region);
if(status < 0) {
- printk(KERN_ERR "%s: failed to claim HP-PB "
- "bus space (0x%08llx, 0x%08llx)\n",
- __FILE__, (unsigned long long) card->mmio_region.start,
- (unsigned long long) card->mmio_region.end);
+ printk(KERN_ERR "%s: failed to claim HP-PB bus space (%pR)\n",
+ __FILE__, &card->mmio_region);
}

return 0;
--
1.7.3.1.g432b3.dirty

2010-11-12 21:40:15

by Joe Perches

[permalink] [raw]
Subject: [PATCH 07/14] drivers/mtd/maps: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/mtd/maps/amd76xrom.c | 7 ++-----
drivers/mtd/maps/ck804xrom.c | 7 ++-----
drivers/mtd/maps/esb2rom.c | 9 +++------
drivers/mtd/maps/ichxrom.c | 9 +++------
drivers/mtd/maps/physmap_of.c | 4 +---
drivers/mtd/maps/scx200_docflash.c | 5 ++---
6 files changed, 13 insertions(+), 28 deletions(-)

diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c
index 19fe92d..77d64ce 100644
--- a/drivers/mtd/maps/amd76xrom.c
+++ b/drivers/mtd/maps/amd76xrom.c
@@ -149,11 +149,8 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
if (request_resource(&iomem_resource, &window->rsrc)) {
window->rsrc.parent = NULL;
printk(KERN_ERR MOD_NAME
- " %s(): Unable to register resource"
- " 0x%.16llx-0x%.16llx - kernel bug?\n",
- __func__,
- (unsigned long long)window->rsrc.start,
- (unsigned long long)window->rsrc.end);
+ " %s(): Unable to register resource %pR - kernel bug?\n",
+ __func__, &window->rsrc);
}


diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c
index ddb462b..5fdb7b2 100644
--- a/drivers/mtd/maps/ck804xrom.c
+++ b/drivers/mtd/maps/ck804xrom.c
@@ -178,11 +178,8 @@ static int __devinit ck804xrom_init_one (struct pci_dev *pdev,
if (request_resource(&iomem_resource, &window->rsrc)) {
window->rsrc.parent = NULL;
printk(KERN_ERR MOD_NAME
- " %s(): Unable to register resource"
- " 0x%.016llx-0x%.016llx - kernel bug?\n",
- __func__,
- (unsigned long long)window->rsrc.start,
- (unsigned long long)window->rsrc.end);
+ " %s(): Unable to register resource %pR - kernel bug?\n",
+ __func__, &window->rsrc);
}


diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c
index d12c93d..4feb750 100644
--- a/drivers/mtd/maps/esb2rom.c
+++ b/drivers/mtd/maps/esb2rom.c
@@ -242,12 +242,9 @@ static int __devinit esb2rom_init_one(struct pci_dev *pdev,
window->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
if (request_resource(&iomem_resource, &window->rsrc)) {
window->rsrc.parent = NULL;
- printk(KERN_DEBUG MOD_NAME
- ": %s(): Unable to register resource"
- " 0x%.08llx-0x%.08llx - kernel bug?\n",
- __func__,
- (unsigned long long)window->rsrc.start,
- (unsigned long long)window->rsrc.end);
+ printk(KERN_DEBUG MOD_NAME ": "
+ "%s(): Unable to register resource %pR - kernel bug?\n",
+ __func__, &window->rsrc);
}

/* Map the firmware hub into my address space. */
diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c
index f102bf2..1337a41 100644
--- a/drivers/mtd/maps/ichxrom.c
+++ b/drivers/mtd/maps/ichxrom.c
@@ -175,12 +175,9 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
window->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
if (request_resource(&iomem_resource, &window->rsrc)) {
window->rsrc.parent = NULL;
- printk(KERN_DEBUG MOD_NAME
- ": %s(): Unable to register resource"
- " 0x%.16llx-0x%.16llx - kernel bug?\n",
- __func__,
- (unsigned long long)window->rsrc.start,
- (unsigned long long)window->rsrc.end);
+ printk(KERN_DEBUG MOD_NAME ": "
+ "%s(): Unable to register resource %pR - kernel bug?\n",
+ __func__, &window->rsrc);
}

/* Map the firmware hub into my address space. */
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 9861814..8506578 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -274,9 +274,7 @@ static int __devinit of_flash_probe(struct platform_device *dev,
continue;
}

- dev_dbg(&dev->dev, "of_flash device: %.8llx-%.8llx\n",
- (unsigned long long)res.start,
- (unsigned long long)res.end);
+ dev_dbg(&dev->dev, "of_flash device: %pR\n", &res);

err = -EBUSY;
res_size = resource_size(&res);
diff --git a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c
index b5391eb..027e628 100644
--- a/drivers/mtd/maps/scx200_docflash.c
+++ b/drivers/mtd/maps/scx200_docflash.c
@@ -166,9 +166,8 @@ static int __init init_scx200_docflash(void)
outl(pmr, scx200_cb_base + SCx200_PMR);
}

- printk(KERN_INFO NAME ": DOCCS mapped at 0x%llx-0x%llx, width %d\n",
- (unsigned long long)docmem.start,
- (unsigned long long)docmem.end, width);
+ printk(KERN_INFO NAME ": DOCCS mapped at %pR, width %d\n",
+ &docmem, width);

scx200_docflash_map.size = size;
if (width == 8)
--
1.7.3.1.g432b3.dirty

2010-11-12 21:44:52

by Joe Perches

[permalink] [raw]
Subject: [PATCH 06/14] drivers/mfd: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/mfd/sm501.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index bc9275c..78638cf 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -745,11 +745,8 @@ static int sm501_register_device(struct sm501_devdata *sm,
int ret;

for (ptr = 0; ptr < pdev->num_resources; ptr++) {
- printk(KERN_DEBUG "%s[%d] flags %08lx: %08llx..%08llx\n",
- pdev->name, ptr,
- pdev->resource[ptr].flags,
- (unsigned long long)pdev->resource[ptr].start,
- (unsigned long long)pdev->resource[ptr].end);
+ printk(KERN_DEBUG "%s[%d] %pR\n",
+ pdev->name, ptr, &pdev->resource[ptr]);
}

ret = platform_device_register(pdev);
--
1.7.3.1.g432b3.dirty

2010-11-12 21:45:12

by Joe Perches

[permalink] [raw]
Subject: [PATCH 04/14] drivers/dma/ppc4xx: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/dma/ppc4xx/adma.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index 0d58a4a..cef5845 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -4449,9 +4449,8 @@ static int __devinit ppc440spe_adma_probe(struct platform_device *ofdev,

if (!request_mem_region(res.start, resource_size(&res),
dev_driver_string(&ofdev->dev))) {
- dev_err(&ofdev->dev, "failed to request memory region "
- "(0x%016llx-0x%016llx)\n",
- (u64)res.start, (u64)res.end);
+ dev_err(&ofdev->dev, "failed to request memory region %pR\n",
+ &res);
initcode = PPC_ADMA_INIT_MEMREG;
ret = -EBUSY;
goto out;
--
1.7.3.1.g432b3.dirty

2010-11-12 21:38:14

by Joe Perches

[permalink] [raw]
Subject: [PATCH 01/14] arch/frv: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
arch/frv/mb93090-mb00/pci-vdk.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c
index f8dd37e..4ff9e70 100644
--- a/arch/frv/mb93090-mb00/pci-vdk.c
+++ b/arch/frv/mb93090-mb00/pci-vdk.c
@@ -382,9 +382,7 @@ int __init pcibios_init(void)
pci_ioport_resource.end = (__reg_MB86943_sl_pci_io_range << 9) | 0x3ff;
pci_ioport_resource.end += pci_ioport_resource.start;

- printk("PCI IO window: %08llx-%08llx\n",
- (unsigned long long) pci_ioport_resource.start,
- (unsigned long long) pci_ioport_resource.end);
+ printk("PCI IO window: %pR\n", &pci_ioport_resource);

pci_iomem_resource.start = (__reg_MB86943_sl_pci_mem_base << 9) & 0xfffffc00;
pci_iomem_resource.end = (__reg_MB86943_sl_pci_mem_range << 9) | 0x3ff;
@@ -397,9 +395,7 @@ int __init pcibios_init(void)
*/
pci_iomem_resource.start += 0x400;

- printk("PCI MEM window: %08llx-%08llx\n",
- (unsigned long long) pci_iomem_resource.start,
- (unsigned long long) pci_iomem_resource.end);
+ printk("PCI MEM window: %pR\n", &pci_iomem_resource);
printk("PCI DMA memory: %08lx-%08lx\n",
dma_coherent_mem_start, dma_coherent_mem_end);

--
1.7.3.1.g432b3.dirty

2010-11-13 00:42:39

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH 03/14] arch/powerpc: Use printf extension %pR for struct resource

Hi Joe,

On Fri, 12 Nov 2010 13:37:53 -0800 Joe Perches <[email protected]> wrote:
>
> Using %pR standardizes the struct resource output.
>
> Signed-off-by: Joe Perches <[email protected]>
> ---
> arch/powerpc/kernel/pci_64.c | 3 +--
> arch/powerpc/sysdev/tsi108_dev.c | 8 ++++----
> 2 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
> index d43fc65..2ecb1de 100644
> --- a/arch/powerpc/kernel/pci_64.c
> +++ b/arch/powerpc/kernel/pci_64.c
> @@ -193,8 +193,7 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
> hose->io_resource.start += io_virt_offset;
> hose->io_resource.end += io_virt_offset;
>
> - pr_debug(" hose->io_resource=0x%016llx...0x%016llx\n",
> - hose->io_resource.start, hose->io_resource.end);
> + pr_debug(" hose->io_resource=%pR\n", &hose->io_resource.start);
^^^^^^^^^^^^^^^^^^^^^^^^
Shouldn't this be just &hose->io_resource?

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (1.08 kB)
(No filename) (490.00 B)
Download all attachments

2010-11-13 00:49:21

by Joe Perches

[permalink] [raw]
Subject: [PATCH 03/14 V2] arch/powerpc: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <[email protected]>
---
On Sat, 2010-11-13 at 11:42 +1100, Stephen Rothwell wrote:
> Shouldn't this be just &hose->io_resource?

V2: Fix stupid editing mistake

arch/powerpc/kernel/pci_64.c | 3 +--
arch/powerpc/sysdev/tsi108_dev.c | 8 ++++----
2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index d43fc65..2ecb1de 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -193,8 +193,7 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
hose->io_resource.start += io_virt_offset;
hose->io_resource.end += io_virt_offset;

- pr_debug(" hose->io_resource=0x%016llx...0x%016llx\n",
- hose->io_resource.start, hose->io_resource.end);
+ pr_debug(" hose->io_resource=%pR\n", &hose->io_resource);

return 0;
}
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c
index d4d15aa..5e249a8 100644
--- a/arch/powerpc/sysdev/tsi108_dev.c
+++ b/arch/powerpc/sysdev/tsi108_dev.c
@@ -83,8 +83,8 @@ static int __init tsi108_eth_of_init(void)
memset(&tsi_eth_data, 0, sizeof(tsi_eth_data));

ret = of_address_to_resource(np, 0, &r[0]);
- DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n",
- __func__,r[0].name, r[0].start, r[0].end);
+ DBG("%s: name:start->end = %s:%pR\n",
+ __func__, r[0].name, &r[0]);
if (ret)
goto err;

@@ -92,8 +92,8 @@ static int __init tsi108_eth_of_init(void)
r[1].start = irq_of_parse_and_map(np, 0);
r[1].end = irq_of_parse_and_map(np, 0);
r[1].flags = IORESOURCE_IRQ;
- DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n",
- __func__,r[1].name, r[1].start, r[1].end);
+ DBG("%s: name:start->end = %s:%pR\n",
+ __func__, r[1].name, &r[1]);

tsi_eth_dev =
platform_device_register_simple("tsi-ethernet", i++, &r[0],
--
1.7.3.1.g432b3.dirty



2010-11-17 20:28:49

by David Miller

[permalink] [raw]
Subject: Re: [PATCH 09/14] drivers/net/can/sja1000: Use printf extension %pR for struct resource

From: Joe Perches <[email protected]>
Date: Fri, 12 Nov 2010 13:37:59 -0800

> Using %pR standardizes the struct resource output.
>
> Signed-off-by: Joe Perches <[email protected]>

Applied.

2010-11-22 06:44:06

by Takashi Iwai

[permalink] [raw]
Subject: Re: [PATCH 14/14] sound/ppc: Use printf extension %pR for struct resource

At Fri, 12 Nov 2010 13:38:04 -0800,
Joe Perches wrote:
>
> Using %pR standardizes the struct resource output.
>
> Signed-off-by: Joe Perches <[email protected]>

Applied now. Thanks.


Takashi


> ---
> sound/ppc/pmac.c | 12 ++++--------
> 1 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
> index 8508117..b47cfd4 100644
> --- a/sound/ppc/pmac.c
> +++ b/sound/ppc/pmac.c
> @@ -1228,10 +1228,8 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
> chip->rsrc[i].start + 1,
> rnames[i]) == NULL) {
> printk(KERN_ERR "snd: can't request rsrc "
> - " %d (%s: 0x%016llx:%016llx)\n",
> - i, rnames[i],
> - (unsigned long long)chip->rsrc[i].start,
> - (unsigned long long)chip->rsrc[i].end);
> + " %d (%s: %pR)\n",
> + i, rnames[i], &chip->rsrc[i]);
> err = -ENODEV;
> goto __error;
> }
> @@ -1256,10 +1254,8 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
> chip->rsrc[i].start + 1,
> rnames[i]) == NULL) {
> printk(KERN_ERR "snd: can't request rsrc "
> - " %d (%s: 0x%016llx:%016llx)\n",
> - i, rnames[i],
> - (unsigned long long)chip->rsrc[i].start,
> - (unsigned long long)chip->rsrc[i].end);
> + " %d (%s: %pR)\n",
> + i, rnames[i], &chip->rsrc[i]);
> err = -ENODEV;
> goto __error;
> }
> --
> 1.7.3.1.g432b3.dirty
>

2010-11-22 20:28:46

by Ralf Baechle

[permalink] [raw]

2010-11-26 11:01:19

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH 06/14] drivers/mfd: Use printf extension %pR for struct resource

Hi Joe,

On Fri, Nov 12, 2010 at 01:37:56PM -0800, Joe Perches wrote:
> Using %pR standardizes the struct resource output.
>
> Signed-off-by: Joe Perches <[email protected]>
Patch applied, thanks.

Cheers,
Samuel.


> ---
> drivers/mfd/sm501.c | 7 ++-----
> 1 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
> index bc9275c..78638cf 100644
> --- a/drivers/mfd/sm501.c
> +++ b/drivers/mfd/sm501.c
> @@ -745,11 +745,8 @@ static int sm501_register_device(struct sm501_devdata *sm,
> int ret;
>
> for (ptr = 0; ptr < pdev->num_resources; ptr++) {
> - printk(KERN_DEBUG "%s[%d] flags %08lx: %08llx..%08llx\n",
> - pdev->name, ptr,
> - pdev->resource[ptr].flags,
> - (unsigned long long)pdev->resource[ptr].start,
> - (unsigned long long)pdev->resource[ptr].end);
> + printk(KERN_DEBUG "%s[%d] %pR\n",
> + pdev->name, ptr, &pdev->resource[ptr]);
> }
>
> ret = platform_device_register(pdev);
> --
> 1.7.3.1.g432b3.dirty
>

--
Intel Open Source Technology Centre
http://oss.intel.com/

2010-11-26 15:59:49

by Artem Bityutskiy

[permalink] [raw]
Subject: Re: [PATCH 07/14] drivers/mtd/maps: Use printf extension %pR for struct resource

On Fri, 2010-11-12 at 13:37 -0800, Joe Perches wrote:
> Using %pR standardizes the struct resource output.
>
> Signed-off-by: Joe Perches <[email protected]>
> ---
> drivers/mtd/maps/amd76xrom.c | 7 ++-----
> drivers/mtd/maps/ck804xrom.c | 7 ++-----
> drivers/mtd/maps/esb2rom.c | 9 +++------
> drivers/mtd/maps/ichxrom.c | 9 +++------
> drivers/mtd/maps/physmap_of.c | 4 +---
> drivers/mtd/maps/scx200_docflash.c | 5 ++---
> 6 files changed, 13 insertions(+), 28 deletions(-)

Pushed this patch and patch N8 to l2-mtd-2.6.git, thanks.

--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)