summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2019-11-28 08:54:42 -0600
committerBjorn Helgaas <bhelgaas@google.com>2019-11-28 08:54:42 -0600
commit454f4de2d93153ec795565b2525768374ac3f644 (patch)
tree924d7038f8b0ef61ad782864dea9d6abcd49a4c4 /drivers/pci
parentd76d273dc861416ac435781818b3a7468bd47d9d (diff)
parentdaee4f4e42c792997f4fee47dcdfa65dd720ec02 (diff)
Merge branch 'remotes/lorenzo/pci/endpoint'
- Fix endpoint driver sign extension problem when shifting page number to phys_addr_t (Alan Mikhak) * remotes/lorenzo/pci/endpoint: PCI: endpoint: Cast the page number to phys_addr_t
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/endpoint/pci-epc-mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/endpoint/pci-epc-mem.c b/drivers/pci/endpoint/pci-epc-mem.c
index 2bf8bd1f0563..d2b174ce15de 100644
--- a/drivers/pci/endpoint/pci-epc-mem.c
+++ b/drivers/pci/endpoint/pci-epc-mem.c
@@ -134,7 +134,7 @@ void __iomem *pci_epc_mem_alloc_addr(struct pci_epc *epc,
if (pageno < 0)
return NULL;
- *phys_addr = mem->phys_base + (pageno << page_shift);
+ *phys_addr = mem->phys_base + ((phys_addr_t)pageno << page_shift);
virt_addr = ioremap(*phys_addr, size);
if (!virt_addr)
bitmap_release_region(mem->bitmap, pageno, order);