aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/test-code-patching.c
diff options
context:
space:
mode:
authorBjorn Helgaas <[email protected]>2021-12-23 15:37:49 -0600
committerBjorn Helgaas <[email protected]>2022-01-03 15:05:28 -0600
commit73a0c2be75cf777fa03eb86487dfbe7fbb88d8a2 (patch)
tree002653e6b25c5ca7c3460914e278054d66e7126d /arch/powerpc/lib/test-code-patching.c
parent088c8405990d9d62ad26dff3c883d2409fa11e06 (diff)
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/[email protected] Signed-off-by: Bjorn Helgaas <[email protected]> Cc: Pratyush Anand <[email protected]>
Diffstat (limited to 'arch/powerpc/lib/test-code-patching.c')
0 files changed, 0 insertions, 0 deletions