diff mbox series

PCI: xgene: Annotate __iomem pointer

Message ID 20210517171839.25777-1-helgaas@kernel.org
State New
Headers show
Series PCI: xgene: Annotate __iomem pointer | expand

Commit Message

Bjorn Helgaas May 17, 2021, 5:18 p.m. UTC
From: Bjorn Helgaas <bhelgaas@google.com>

"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.

Link: https://lore.kernel.org/r/202105171809.Tay9fImZ-lkp@intel.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/controller/pci-xgene.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lorenzo Pieralisi June 3, 2021, 2:35 p.m. UTC | #1
On Mon, 17 May 2021 12:18:39 -0500, Bjorn Helgaas wrote:
> "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.

Applied to pci/xgene, thanks!

[1/1] PCI: xgene: Annotate __iomem pointer
      https://git.kernel.org/lpieralisi/pci/c/eabbc3ccbe

Thanks,
Lorenzo
diff mbox series

Patch

diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c
index 7f503dd4ff81..1a412f5377fb 100644
--- a/drivers/pci/controller/pci-xgene.c
+++ b/drivers/pci/controller/pci-xgene.c
@@ -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;