Re: [PATCH v2] PCI: endpoint: Cast the page number to phys_addr_t

2019-10-15 Thread Lorenzo Pieralisi
On Wed, Oct 09, 2019 at 10:06:56AM -0700, Alan Mikhak wrote: > From: Alan Mikhak > > Modify pci_epc_mem_alloc_addr() to cast the variable 'pageno' > from type 'int' to 'phys_addr_t' before shifting left. This > cast is needed to avoid treating bit 31 of 'pageno' as the > sign bit which would

[PATCH v2] PCI: endpoint: Cast the page number to phys_addr_t

2019-10-09 Thread Alan Mikhak
From: Alan Mikhak Modify pci_epc_mem_alloc_addr() to cast the variable 'pageno' from type 'int' to 'phys_addr_t' before shifting left. This cast is needed to avoid treating bit 31 of 'pageno' as the sign bit which would otherwise get sign-extended to produce a negative value. When added to the