]> Git Repo - J-linux.git/commit
PCI: hisi: Avoid invalid address space conversions
authorBjorn Helgaas <[email protected]>
Thu, 23 Dec 2021 21:37:48 +0000 (15:37 -0600)
committerBjorn Helgaas <[email protected]>
Mon, 3 Jan 2022 21:05:28 +0000 (15:05 -0600)
commit088c8405990d9d62ad26dff3c883d2409fa11e06
tree0e287936bbf554e6f9403870c1692f7ae75ed58f
parentdacee5872d896b1aaec982829f3b4a3e8e14e53c
PCI: hisi: Avoid invalid address space conversions

The sparse checker complains about converting pointers between address
spaces.  The pci_config_window.priv pointer is a generic void *, but
hisi_pcie_map_bus() needs a void __iomem *.

This isn't a problem in other drivers because they store the __iomem
pointer in a driver struct.  Add a trivial struct hisi_pcie to avoid the
warning.

The sparse warning looks like this:

  $ make C=2 drivers/pci/controller/
  drivers/pci/controller/dwc/pcie-hisi.c:61:37: warning: incorrect type in initializer (different address spaces)
  drivers/pci/controller/dwc/pcie-hisi.c:61:37:    expected void [noderef] __iomem *reg_base
  drivers/pci/controller/dwc/pcie-hisi.c:61:37:    got void *priv

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Zhou Wang <[email protected]>
drivers/pci/controller/dwc/pcie-hisi.c
This page took 0.050335 seconds and 4 git commands to generate.