Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6776e6d authored by Nikhil P Rao's avatar Nikhil P Rao Committed by Bjorn Helgaas
Browse files

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: default avatarNikhil P Rao <nikhil.rao@intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent cfaf0251
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;