On Thu, Jun 22, 2023 at 12:12:22PM +0200, Arnd Bergmann wrote: > Change the driver to instead use the physical address as stored in the > PCI BAR resource directly. Since 'dev_addr' is a 32-bit address, I think > this results in the same truncated address on loongarch but is otherwise > closer to portable code and avoids the warning. This gets rid of the warning, but is still broken. pci_resource_start retuns a resource_size_t, which really is a phys_addr_t, but certainly no DMA address. To map PCI(e) resources for DMA the driver needs to call dma_map_resource.