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
This commit is contained in:
Bjorn Helgaas 2019-11-28 08:54:42 -06:00
commit 454f4de2d9

View File

@ -134,7 +134,7 @@ void __iomem *pci_epc_mem_alloc_addr(struct pci_epc *epc,
if (pageno < 0) if (pageno < 0)
return NULL; 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); virt_addr = ioremap(*phys_addr, size);
if (!virt_addr) if (!virt_addr)
bitmap_release_region(mem->bitmap, pageno, order); bitmap_release_region(mem->bitmap, pageno, order);