aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-10-27 15:26:47 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-04 16:06:41 -0500
commitc7dabef8a2c59e6a3de9d66fc35fb6a43ef7172d (patch)
tree0f8b0021e693a0e380ef9026083b59d0909dffc6 /drivers/pci/probe.c
parent4fd8bdc567e70c02fab7eeaaa7d2a64232add789 (diff)
vsprintf: use %pR, %pr instead of %pRt, %pRf
Jesse accidentally applied v1 [1] of the patchset instead of v2 [2]. This is the diff between v1 and v2. The changes in this patch are: - tidied vsprintf stack buffer to shrink and compute size more accurately - use %pR for decoding and %pr for "raw" (with type and flags) instead of adding %pRt and %pRf [1] http://lkml.org/lkml/2009/10/6/491 [2] http://lkml.org/lkml/2009/10/13/441 Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 4842b09b7f3c..4c4aca53ae09 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -225,12 +225,13 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
225 if (!sz64) 225 if (!sz64)
226 goto fail; 226 goto fail;
227 227
228 res->flags |= IORESOURCE_MEM_64;
229
230 if ((sizeof(resource_size_t) < 8) && (sz64 > 0x100000000ULL)) { 228 if ((sizeof(resource_size_t) < 8) && (sz64 > 0x100000000ULL)) {
231 dev_err(&dev->dev, "can't handle 64-bit BAR\n"); 229 dev_err(&dev->dev, "can't handle 64-bit BAR\n");
232 goto fail; 230 goto fail;
233 } else if ((sizeof(resource_size_t) < 8) && l) { 231 }
232
233 res->flags |= IORESOURCE_MEM_64;
234 if ((sizeof(resource_size_t) < 8) && l) {
234 /* Address above 32-bit boundary; disable the BAR */ 235 /* Address above 32-bit boundary; disable the BAR */
235 pci_write_config_dword(dev, pos, 0); 236 pci_write_config_dword(dev, pos, 0);
236 pci_write_config_dword(dev, pos + 4, 0); 237 pci_write_config_dword(dev, pos + 4, 0);
@@ -239,7 +240,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
239 } else { 240 } else {
240 res->start = l64; 241 res->start = l64;
241 res->end = l64 + sz64; 242 res->end = l64 + sz64;
242 dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pRt\n", 243 dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n",
243 pos, res); 244 pos, res);
244 } 245 }
245 } else { 246 } else {
@@ -251,7 +252,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
251 res->start = l; 252 res->start = l;
252 res->end = l + sz; 253 res->end = l + sz;
253 254
254 dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pRt\n", pos, res); 255 dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n", pos, res);
255 } 256 }
256 257
257 out: 258 out:
@@ -319,7 +320,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
319 res->start = base; 320 res->start = base;
320 if (!res->end) 321 if (!res->end)
321 res->end = limit + 0xfff; 322 res->end = limit + 0xfff;
322 dev_printk(KERN_DEBUG, &dev->dev, "bridge window: %pRt\n", res); 323 dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res);
323 } 324 }
324 325
325 res = child->resource[1]; 326 res = child->resource[1];
@@ -331,7 +332,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
331 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; 332 res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
332 res->start = base; 333 res->start = base;
333 res->end = limit + 0xfffff; 334 res->end = limit + 0xfffff;
334 dev_printk(KERN_DEBUG, &dev->dev, "bridge window: %pRt\n", res); 335 dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res);
335 } 336 }
336 337
337 res = child->resource[2]; 338 res = child->resource[2];
@@ -370,7 +371,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
370 res->flags |= IORESOURCE_MEM_64; 371 res->flags |= IORESOURCE_MEM_64;
371 res->start = base; 372 res->start = base;
372 res->end = limit + 0xfffff; 373 res->end = limit + 0xfffff;
373 dev_printk(KERN_DEBUG, &dev->dev, "bridge window: %pRt\n", res); 374 dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res);
374 } 375 }
375} 376}
376 377