diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-10-27 15:26:47 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-04 16:06:41 -0500 |
commit | c7dabef8a2c59e6a3de9d66fc35fb6a43ef7172d (patch) | |
tree | 0f8b0021e693a0e380ef9026083b59d0909dffc6 /drivers/pci/setup-res.c | |
parent | 4fd8bdc567e70c02fab7eeaaa7d2a64232add789 (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/setup-res.c')
-rw-r--r-- | drivers/pci/setup-res.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 5e78f2096ce8..357ca5c54607 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -51,9 +51,11 @@ void pci_update_resource(struct pci_dev *dev, int resno) | |||
51 | 51 | ||
52 | pcibios_resource_to_bus(dev, ®ion, res); | 52 | pcibios_resource_to_bus(dev, ®ion, res); |
53 | 53 | ||
54 | dev_dbg(&dev->dev, "BAR %d: got %pRf (bus addr [%#llx-%#llx])\n", | 54 | dev_dbg(&dev->dev, "BAR %d: got res %pR bus [%#llx-%#llx] " |
55 | resno, res, (unsigned long long)region.start, | 55 | "flags %#lx\n", resno, res, |
56 | (unsigned long long)region.end); | 56 | (unsigned long long)region.start, |
57 | (unsigned long long)region.end, | ||
58 | (unsigned long)res->flags); | ||
57 | 59 | ||
58 | new = region.start | (res->flags & PCI_REGION_FLAG_MASK); | 60 | new = region.start | (res->flags & PCI_REGION_FLAG_MASK); |
59 | if (res->flags & IORESOURCE_IO) | 61 | if (res->flags & IORESOURCE_IO) |
@@ -89,8 +91,8 @@ void pci_update_resource(struct pci_dev *dev, int resno) | |||
89 | } | 91 | } |
90 | } | 92 | } |
91 | res->flags &= ~IORESOURCE_UNSET; | 93 | res->flags &= ~IORESOURCE_UNSET; |
92 | dev_dbg(&dev->dev, "BAR %d: moved to bus addr [%#llx-%#llx]\n", | 94 | dev_dbg(&dev->dev, "BAR %d: moved to %pR (bus addr [%#llx-%#llx])\n", |
93 | resno, (unsigned long long)region.start, | 95 | resno, res, (unsigned long long)region.start, |
94 | (unsigned long long)region.end); | 96 | (unsigned long long)region.end); |
95 | } | 97 | } |
96 | 98 | ||
@@ -108,7 +110,7 @@ int pci_claim_resource(struct pci_dev *dev, int resource) | |||
108 | 110 | ||
109 | if (err) { | 111 | if (err) { |
110 | const char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge"; | 112 | const char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge"; |
111 | dev_err(&dev->dev, "BAR %d: %s %s %pRt\n", | 113 | dev_err(&dev->dev, "BAR %d: %s of %s %pR\n", |
112 | resource, | 114 | resource, |
113 | root ? "address space collision on" : | 115 | root ? "address space collision on" : |
114 | "no parent found for", | 116 | "no parent found for", |
@@ -179,7 +181,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
179 | 181 | ||
180 | align = pci_resource_alignment(dev, res); | 182 | align = pci_resource_alignment(dev, res); |
181 | if (!align) { | 183 | if (!align) { |
182 | dev_info(&dev->dev, "BAR %d: can't allocate %pRf " | 184 | dev_info(&dev->dev, "BAR %d: can't allocate %pR " |
183 | "(bogus alignment)\n", resno, res); | 185 | "(bogus alignment)\n", resno, res); |
184 | return -EINVAL; | 186 | return -EINVAL; |
185 | } | 187 | } |
@@ -196,7 +198,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
196 | } | 198 | } |
197 | 199 | ||
198 | if (ret) | 200 | if (ret) |
199 | dev_info(&dev->dev, "BAR %d: can't allocate %pRt\n", | 201 | dev_info(&dev->dev, "BAR %d: can't allocate %pR\n", |
200 | resno, res); | 202 | resno, res); |
201 | 203 | ||
202 | return ret; | 204 | return ret; |
@@ -222,7 +224,7 @@ void pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) | |||
222 | 224 | ||
223 | r_align = pci_resource_alignment(dev, r); | 225 | r_align = pci_resource_alignment(dev, r); |
224 | if (!r_align) { | 226 | if (!r_align) { |
225 | dev_warn(&dev->dev, "BAR %d: bogus alignment %pRf\n", | 227 | dev_warn(&dev->dev, "BAR %d: %pR has bogus alignment\n", |
226 | i, r); | 228 | i, r); |
227 | continue; | 229 | continue; |
228 | } | 230 | } |