diff options
| author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-10-27 13:26:47 -0600 | 
|---|---|---|
| committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-04 13:06:41 -0800 | 
| commit | c7dabef8a2c59e6a3de9d66fc35fb6a43ef7172d (patch) | |
| tree | 0f8b0021e693a0e380ef9026083b59d0909dffc6 /drivers/pci/probe.c | |
| parent | 4fd8bdc567e70c02fab7eeaaa7d2a64232add789 (diff) | |
| download | olio-linux-3.10-c7dabef8a2c59e6a3de9d66fc35fb6a43ef7172d.tar.xz olio-linux-3.10-c7dabef8a2c59e6a3de9d66fc35fb6a43ef7172d.zip  | |
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.c | 17 | 
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 4842b09b7f3..4c4aca53ae0 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,  		if (!sz64)  			goto fail; -		res->flags |= IORESOURCE_MEM_64; -  		if ((sizeof(resource_size_t) < 8) && (sz64 > 0x100000000ULL)) {  			dev_err(&dev->dev, "can't handle 64-bit BAR\n");  			goto fail; -		} else if ((sizeof(resource_size_t) < 8) && l) { +		} + +		res->flags |= IORESOURCE_MEM_64; +		if ((sizeof(resource_size_t) < 8) && l) {  			/* Address above 32-bit boundary; disable the BAR */  			pci_write_config_dword(dev, pos, 0);  			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,  		} else {  			res->start = l64;  			res->end = l64 + sz64; -			dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pRt\n", +			dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n",  				   pos, res);  		}  	} else { @@ -251,7 +252,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,  		res->start = l;  		res->end = l + sz; -		dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pRt\n", pos, res); +		dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n", pos, res);  	}   out: @@ -319,7 +320,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)  			res->start = base;  		if (!res->end)  			res->end = limit + 0xfff; -		dev_printk(KERN_DEBUG, &dev->dev, "bridge window: %pRt\n", res); +		dev_printk(KERN_DEBUG, &dev->dev, "  bridge window %pR\n", res);  	}  	res = child->resource[1]; @@ -331,7 +332,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)  		res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;  		res->start = base;  		res->end = limit + 0xfffff; -		dev_printk(KERN_DEBUG, &dev->dev, "bridge window: %pRt\n", res); +		dev_printk(KERN_DEBUG, &dev->dev, "  bridge window %pR\n", res);  	}  	res = child->resource[2]; @@ -370,7 +371,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)  			res->flags |= IORESOURCE_MEM_64;  		res->start = base;  		res->end = limit + 0xfffff; -		dev_printk(KERN_DEBUG, &dev->dev, "bridge window: %pRt\n", res); +		dev_printk(KERN_DEBUG, &dev->dev, "  bridge window %pR\n", res);  	}  }  |