linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] openrisc: io: Add missing __iomem annotation to iounmap()
@ 2020-12-28  8:33 Geert Uytterhoeven
  2021-01-19 21:18 ` Stafford Horne
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2020-12-28  8:33 UTC (permalink / raw)
  To: Jonas Bonn, Stefan Kristiansson, Stafford Horne
  Cc: openrisc, linux-kernel, Geert Uytterhoeven, kernel test robot

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>
---
 arch/openrisc/include/asm/io.h | 2 +-
 arch/openrisc/mm/ioremap.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/openrisc/include/asm/io.h b/arch/openrisc/include/asm/io.h
index 7d6b4a77b379d8e2..c298061c70a7ee2e 100644
--- a/arch/openrisc/include/asm/io.h
+++ b/arch/openrisc/include/asm/io.h
@@ -31,7 +31,7 @@
 void __iomem *ioremap(phys_addr_t offset, unsigned long size);
 
 #define iounmap iounmap
-extern void iounmap(void *addr);
+extern void iounmap(void __iomem *addr);
 
 #include <asm-generic/io.h>
 
diff --git a/arch/openrisc/mm/ioremap.c b/arch/openrisc/mm/ioremap.c
index a978590d802d0c3b..9595be51b100c40e 100644
--- a/arch/openrisc/mm/ioremap.c
+++ b/arch/openrisc/mm/ioremap.c
@@ -78,7 +78,7 @@ void __iomem *__ref ioremap(phys_addr_t addr, unsigned long size)
 }
 EXPORT_SYMBOL(ioremap);
 
-void iounmap(void *addr)
+void iounmap(void __iomem *addr)
 {
 	/* If the page is from the fixmap pool then we just clear out
 	 * the fixmap mapping.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] openrisc: io: Add missing __iomem annotation to iounmap()
  2020-12-28  8:33 [PATCH] openrisc: io: Add missing __iomem annotation to iounmap() Geert Uytterhoeven
@ 2021-01-19 21:18 ` Stafford Horne
  0 siblings, 0 replies; 2+ messages in thread
From: Stafford Horne @ 2021-01-19 21:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jonas Bonn, Stefan Kristiansson, openrisc, linux-kernel,
	kernel test robot

On Mon, Dec 28, 2020 at 09:33:28AM +0100, Geert Uytterhoeven wrote:
> 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>

Reviewed and OK.  I queued this to my 5.11 fixes branch.  I will send a PR for this
over the weekend.

https://github.com/openrisc/linux/commits/or1k-5.11-fixes

(Found this one in spam and hopefully fixed up my filters now)

-Stafford

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-19 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28  8:33 [PATCH] openrisc: io: Add missing __iomem annotation to iounmap() Geert Uytterhoeven
2021-01-19 21:18 ` Stafford Horne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).