]> git.itanic.dy.fi Git - linux-stable/commitdiff
sh: Convert iounmap() macros to inline functions
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 20 Jan 2020 01:22:17 +0000 (10:22 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:18 +0000 (17:49 +0200)
commit 4580ba4ad2e6b8ddaada3db61d179d4dfac12047 upstream.

Macro iounmap() do nothing, but that results in
unused variable warnings all over the place.
This patch convert it to inline to avoid warning

We will get this warning without this patch

${LINUX}/drivers/thermal/broadcom/ns-thermal.c:78:21: \
  warning: unused variable 'ns_thermal' [-Wunused-variable]
struct ns_thermal *ns_thermal = platform_get_drvdata(pdev);
^~~~~~~~~~

Fixes: 98c90e5ea34e9 ("sh: remove __iounmap")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Rich Felker <dalias@libc.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/sh/include/asm/io.h

index 39c9ead489e5cee48056d8918bbe26510d7c0ae1..b42228906eaf269189d31573d66503acd4558b9a 100644 (file)
@@ -328,7 +328,7 @@ __ioremap_mode(phys_addr_t offset, unsigned long size, pgprot_t prot)
 #else
 #define __ioremap(offset, size, prot)          ((void __iomem *)(offset))
 #define __ioremap_mode(offset, size, prot)     ((void __iomem *)(offset))
-#define iounmap(addr)                          do { } while (0)
+static inline void iounmap(void __iomem *addr) {}
 #endif /* CONFIG_MMU */
 
 static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)