Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

openrisc: io: Add missing __iomem annotation to iounmap()

With C=1:

drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem *[assigned] base @@
drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: expected void *addr
drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: got void [noderef] __iomem *[assigned] base

Fix this by adding the missing __iomem annotation to iounmap().

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Stafford Horne <shorne@gmail.com>

authored by

Geert Uytterhoeven and committed by
Stafford Horne
031c7a8c e6dc077b

+2 -2
+1 -1
arch/openrisc/include/asm/io.h
··· 31 31 void __iomem *ioremap(phys_addr_t offset, unsigned long size); 32 32 33 33 #define iounmap iounmap 34 - extern void iounmap(void *addr); 34 + extern void iounmap(void __iomem *addr); 35 35 36 36 #include <asm-generic/io.h> 37 37
+1 -1
arch/openrisc/mm/ioremap.c
··· 77 77 } 78 78 EXPORT_SYMBOL(ioremap); 79 79 80 - void iounmap(void *addr) 80 + void iounmap(void __iomem *addr) 81 81 { 82 82 /* If the page is from the fixmap pool then we just clear out 83 83 * the fixmap mapping.