aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-20 00:07:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 12:12:32 -0400
commit096e6f673dc02a6394dc9a7d8f8735c6978f5b91 (patch)
tree50e9f463b089dc1b62c3f260a27d500040534525 /drivers/pci/probe.c
parent332d2e7834986a9326ec3fa6a91641daef81746c (diff)
pci: Use new %pR to print resource ranges
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index dd9161a054e1..d3db8b249729 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -304,9 +304,8 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
304 } else { 304 } else {
305 res->start = l64; 305 res->start = l64;
306 res->end = l64 + sz64; 306 res->end = l64 + sz64;
307 printk(KERN_DEBUG "PCI: %s reg %x 64bit mmio: [%llx, %llx]\n", 307 printk(KERN_DEBUG "PCI: %s reg %x 64bit mmio: %pR\n",
308 pci_name(dev), pos, (unsigned long long)res->start, 308 pci_name(dev), pos, res);
309 (unsigned long long)res->end);
310 } 309 }
311 } else { 310 } else {
312 sz = pci_size(l, sz, mask); 311 sz = pci_size(l, sz, mask);
@@ -316,9 +315,10 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
316 315
317 res->start = l; 316 res->start = l;
318 res->end = l + sz; 317 res->end = l + sz;
319 printk(KERN_DEBUG "PCI: %s reg %x %s: [%llx, %llx]\n", pci_name(dev), 318 printk(KERN_DEBUG "PCI: %s reg %x %s: %pR\n",
320 pos, (res->flags & IORESOURCE_IO) ? "io port":"32bit mmio", 319 pci_name(dev), pos,
321 (unsigned long long)res->start, (unsigned long long)res->end); 320 (res->flags & IORESOURCE_IO) ? "io port":"32bit mmio",
321 res);
322 } 322 }
323 323
324 out: 324 out:
@@ -389,9 +389,8 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
389 res->start = base; 389 res->start = base;
390 if (!res->end) 390 if (!res->end)
391 res->end = limit + 0xfff; 391 res->end = limit + 0xfff;
392 printk(KERN_DEBUG "PCI: bridge %s io port: [%llx, %llx]\n", 392 printk(KERN_DEBUG "PCI: bridge %s io port: %pR\n",
393 pci_name(dev), (unsigned long long) res->start, 393 pci_name(dev), res);
394 (unsigned long long) res->end);
395 } 394 }
396 395
397 res = child->resource[1]; 396 res = child->resource[1];
@@ -403,9 +402,8 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
403 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; 402 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
404 res->start = base; 403 res->start = base;
405 res->end = limit + 0xfffff; 404 res->end = limit + 0xfffff;
406 printk(KERN_DEBUG "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", 405 printk(KERN_DEBUG "PCI: bridge %s 32bit mmio: %pR\n",
407 pci_name(dev), (unsigned long long) res->start, 406 pci_name(dev), res);
408 (unsigned long long) res->end);
409 } 407 }
410 408
411 res = child->resource[2]; 409 res = child->resource[2];
@@ -441,9 +439,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
441 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; 439 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
442 res->start = base; 440 res->start = base;
443 res->end = limit + 0xfffff; 441 res->end = limit + 0xfffff;
444 printk(KERN_DEBUG "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n", 442 printk(KERN_DEBUG "PCI: bridge %s %sbit mmio pref: %pR\n",
445 pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64" : "32", 443 pci_name(dev),
446 (unsigned long long) res->start, (unsigned long long) res->end); 444 (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64":"32", res);
447 } 445 }
448} 446}
449 447