aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikhil P Rao <nikhil.rao@intel.com>2012-06-20 15:56:00 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-07-11 18:57:44 -0400
commitd6776e6d5c2f8db0252f447b09736075e1bbe387 (patch)
tree304355b34b77cd64b30a95f79b16a08d1521e17b
parentcfaf025112d3856637ff34a767ef785ef5cf2ca9 (diff)
PCI: fix truncation of resource size to 32 bits
_pci_assign_resource() took an int "size" argument, which meant that sizes larger than 4GB were truncated. Change type to resource_size_t. [bhelgaas: changelog] Signed-off-by: Nikhil P Rao <nikhil.rao@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/pci/setup-res.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index eea85dafc763..be76ebacf486 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -206,7 +206,8 @@ static int pci_revert_fw_address(struct resource *res, struct pci_dev *dev,
206 return ret; 206 return ret;
207} 207}
208 208
209static int _pci_assign_resource(struct pci_dev *dev, int resno, int size, resource_size_t min_align) 209static int _pci_assign_resource(struct pci_dev *dev, int resno,
210 resource_size_t size, resource_size_t min_align)
210{ 211{
211 struct resource *res = dev->resource + resno; 212 struct resource *res = dev->resource + resno;
212 struct pci_bus *bus; 213 struct pci_bus *bus;