linux-stable/drivers/pci
Bjorn Helgaas 73a0c2be75 PCI: spear13xx: Avoid invalid address space conversions
The sparse checker complains about converting pointers between address
spaces.  We correctly stored an __iomem pointer in struct spear13xx_pcie,
but discarded the __iomem when extracting app_base, causing one warning.
Then we passed the non-__iomem pointer to writel(), which expects an
__iomem pointer, causing another warning.

Add the appropriate annotations.

The sparse warnings look like this:

  $ make C=2 drivers/pci/controller/
  drivers/pci/controller/dwc/pcie-spear13xx.c:72:54: warning: incorrect type in initializer (different address spaces)
  drivers/pci/controller/dwc/pcie-spear13xx.c:72:54:    expected struct pcie_app_reg *app_reg
  drivers/pci/controller/dwc/pcie-spear13xx.c:72:54:    got void [noderef] __iomem *app_base
  drivers/pci/controller/dwc/pcie-spear13xx.c:78:26: warning: incorrect type in argument 2 (different address spaces)
  drivers/pci/controller/dwc/pcie-spear13xx.c:78:26:    expected void volatile [noderef] __iomem *addr
  drivers/pci/controller/dwc/pcie-spear13xx.c:78:26:    got unsigned int *

Link: https://lore.kernel.org/r/20211223213749.1314142-3-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Pratyush Anand <pratyush.anand@gmail.com>
2022-01-03 15:05:28 -06:00
..
controller PCI: spear13xx: Avoid invalid address space conversions 2022-01-03 15:05:28 -06:00
endpoint Merge branch 'remotes/lorenzo/pci/endpoint' 2021-11-05 11:28:50 -05:00
hotplug s390/pci: implement reset_slot for hotplug slot 2021-11-08 14:17:49 +01:00
pcie Revert "PCI: Use to_pci_driver() instead of pci_dev->driver" 2021-11-11 13:36:22 -06:00
switch PCI/switchtec: Add check of event support 2021-10-14 09:22:47 -05:00
access.c
ats.c PCI: Allow PASID on fake PCIe devices without TLP prefixes 2021-08-26 14:21:42 -05:00
bus.c
ecam.c PCI: Dynamically map ECAM regions 2021-06-16 17:20:40 -05:00
host-bridge.c PCI: VMD: ACPI: Make ACPI companion lookup work for VMD bus 2021-09-02 17:59:58 +02:00
iov.c Revert "PCI: Use to_pci_driver() instead of pci_dev->driver" 2021-11-11 13:36:22 -06:00
irq.c
Kconfig PCI: only build xen-pcifront in PV-enabled environments 2021-09-20 17:01:11 +02:00
Makefile
mmap.c
msi.c PCI/MSI: Destroy sysfs before freeing entries 2021-11-11 09:50:31 +01:00
of.c PCI: of: Allow matching of an interrupt-map local to a PCI device 2021-11-04 14:16:56 -05:00
p2pdma.c Merge branch 'pci/sysfs' 2021-11-05 11:28:46 -05:00
pci-acpi.c Merge branch 'pm-pci' 2021-11-02 19:06:30 +01:00
pci-bridge-emul.c PCI: pci-bridge-emul: Fix emulation of W1C bits 2021-10-29 10:25:31 +01:00
pci-bridge-emul.h PCI: pci-bridge-emul: Add PCIe Root Capabilities Register 2021-08-05 10:51:49 +01:00
pci-driver.c Revert "PCI: Use to_pci_driver() instead of pci_dev->driver" 2021-11-11 13:36:22 -06:00
pci-label.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
pci-mid.c PCI: PM: Do not use pci_platform_pm_ops for Intel MID PM 2021-09-27 17:13:21 +02:00
pci-pf-stub.c
pci-stub.c
pci-sysfs.c pci-v5.16-changes 2021-11-06 14:36:12 -07:00
pci.c s390 updates for the 5.16 merge window #2 2021-11-13 09:18:06 -08:00
pci.h pci-v5.16-changes 2021-11-06 14:36:12 -07:00
probe.c Merge branch 'pci/misc' 2021-11-05 11:28:47 -05:00
proc.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
quirks.c PCI: Add MSI masking quirk for Nvidia ION AHCI 2021-11-11 09:50:31 +01:00
remove.c PCI: Remove reset_fn field from pci_dev 2021-08-17 17:44:38 -05:00
rom.c PCI: Prefer 'unsigned int' over bare 'unsigned' 2021-10-27 13:41:22 -05:00
search.c
setup-bus.c PCI: Prefer 'unsigned int' over bare 'unsigned' 2021-10-27 13:41:22 -05:00
setup-irq.c PCI: Tidy comments 2021-09-28 13:43:17 -05:00
setup-res.c
slot.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
syscall.c PCI: Return int from pciconfig_read() syscall 2021-08-03 16:55:48 -05:00
vc.c
vpd.c PCI/VPD: Use pci_read_vpd_any() in pci_vpd_size() 2021-10-25 19:12:23 -05:00
xen-pcifront.c xen/pcifront: Use to_pci_driver() instead of pci_dev->driver 2021-10-15 11:43:43 -05:00