Skip to content

Commit 454f4de

Browse files
committed
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
2 parents d76d273 + daee4f4 commit 454f4de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/endpoint/pci-epc-mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void __iomem *pci_epc_mem_alloc_addr(struct pci_epc *epc,
134134
if (pageno < 0)
135135
return NULL;
136136

137-
*phys_addr = mem->phys_base + (pageno << page_shift);
137+
*phys_addr = mem->phys_base + ((phys_addr_t)pageno << page_shift);
138138
virt_addr = ioremap(*phys_addr, size);
139139
if (!virt_addr)
140140
bitmap_release_region(mem->bitmap, pageno, order);

0 commit comments

Comments
 (0)