From deb44711675efa923ee8cebc0c5730d6f5905b32 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 28 Apr 2022 11:08:16 +0200 Subject: ARM: omap: fix address space warnings from sparse Moving sram code from plat-omap got the attention of the kernel test robot. I found a few more places with related warnings because the sram references are a mix of kernel pointers and __iomem pointers: mach-omap1/sram-init.c:56:17: warning: cast removes address space '__iomem' of expression mach-omap1/board-ams-delta.c:667:9: warning: incorrect type in argument 1 (different base types) mach-omap2/sram.c:78:17: warning: cast removes address space '__iomem' of expression mach-omap2/omap4-common.c:142:27: warning: incorrect type in assignment (different address spaces) mach-omap2/omap4-common.c:142:27: expected void [noderef] __iomem *static [toplevel] sram_sync mach-omap2/omap4-common.c:142:27: got void * mach-omap2/pm34xx.c:113:45: warning: incorrect type in argument 1 (different address spaces) mach-omap2/pm34xx.c:113:45: expected void [noderef] __iomem *save_regs mach-omap2/pm34xx.c:113:45: got void *extern [addressable] [toplevel] omap3_secure_ram_storage There is no good solution here, as sram is a bit special in this regard. Change the annotations to at least shut up the warnings. Reported-by: kernel test robot Signed-off-by: Arnd Bergmann --- arch/arm/mach-omap2/omap4-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-omap2/omap4-common.c') diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 5c3845730dbf..3530b77dd2f0 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -139,7 +139,7 @@ static int __init omap4_sram_init(void) pr_warn("%s:Unable to get sram pool needed to handle errata I688\n", __func__); else - sram_sync = (void *)gen_pool_alloc(sram_pool, PAGE_SIZE); + sram_sync = (void __iomem *)gen_pool_alloc(sram_pool, PAGE_SIZE); return 0; } -- cgit v1.2.3