PCI: xgene: Annotate __iomem pointer
PATCH 1/1 PCI: xgene: Annotate __iomem pointer
From: Bjorn Helgaas <[email protected]>
"bar_addr" is passed as the argument to writel(), which expects a "void __iomem *". Annotate "bar_addr" correctly. Resolves an sparse "incorrect type in argument 2 (different address spaces)" warning.
Reported-by kernel test robot <[email protected]>
Signed-off-by Bjorn Helgaas <[email protected]>
--- drivers/pci/controller/pci-xgene.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/pci-xgene.c +1 -1
@@ -485,7 +485,7 @@ static void xgene_pcie_setup_ib_reg(struct xgene_pcie_port *port, {void __iomem *cfg_base = port->cfg_base;struct device *dev = port->dev; -void *bar_addr; +void __iomem *bar_addr;u32 pim_reg;u64 cpu_addr = entry->res->start;u64 pci_addr = cpu_addr - entry->offset;
Signature · 1 line
2.25.1
Lorenzo Pieralisi
AppliedQuoted 3 lines · Bjorn Helgaas
"
bar_addr" is passed as the argument towritel(), which expects a "void__iomem*". Annotate "bar_addr" correctly. Resolves an sparse "incorrect type in argument 2 (different address spaces)" warning.
Applied to pci/xgene, thanks!
[1/1] PCI: xgene: Annotate __iomem pointer
https://git.kernel.org/lpieralisi/pci/c/eabbc3ccbe
Thanks,
Lorenzo