Skip to content

Commit

Permalink
PCI: fix truncation of resource size to 32 bits
Browse files Browse the repository at this point in the history
_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>
  • Loading branch information
Nikhil P Rao authored and Bjorn Helgaas committed Jul 11, 2012
1 parent cfaf025 commit d6776e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/pci/setup-res.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ static int pci_revert_fw_address(struct resource *res, struct pci_dev *dev,
return ret;
}

static int _pci_assign_resource(struct pci_dev *dev, int resno, int size, resource_size_t min_align)
static int _pci_assign_resource(struct pci_dev *dev, int resno,
resource_size_t size, resource_size_t min_align)
{
struct resource *res = dev->resource + resno;
struct pci_bus *bus;
Expand Down

0 comments on commit d6776e6

Please sign in to comment.