* [PATCH] SH: Convert iounmap() macros to inline functions
@ 2019-12-17 6:48 Kuninori Morimoto
2019-12-17 6:53 ` Sam Ravnborg
2019-12-17 7:37 ` Kuninori Morimoto
0 siblings, 2 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2019-12-17 6:48 UTC (permalink / raw)
To: linux-sh
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Macro iounmap() do nothing, but that results in
unused variable warnings all over the place.
This patch convert it to inline to avoid warning
Fixes: 98c90e5ea34e9 ("sh: remove __iounmap")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/sh/include/asm/io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 1495489..351a0a9 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -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)
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] SH: Convert iounmap() macros to inline functions
2019-12-17 6:48 [PATCH] SH: Convert iounmap() macros to inline functions Kuninori Morimoto
@ 2019-12-17 6:53 ` Sam Ravnborg
2019-12-17 7:37 ` Kuninori Morimoto
1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2019-12-17 6:53 UTC (permalink / raw)
To: linux-sh
Hi Kuninori
On Tue, Dec 17, 2019 at 03:48:57PM +0900, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Macro iounmap() do nothing, but that results in
> unused variable warnings all over the place.
> This patch convert it to inline to avoid warning
To help other people with the same warning it is always a good idea to
include the warning you fix in the changelog.
With this fixed:
Acked-by: Sam Ravnborg <sam@ravnborg.org>
>
> Fixes: 98c90e5ea34e9 ("sh: remove __iounmap")
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/sh/include/asm/io.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
> index 1495489..351a0a9 100644
> --- a/arch/sh/include/asm/io.h
> +++ b/arch/sh/include/asm/io.h
> @@ -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)
> --
> 2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SH: Convert iounmap() macros to inline functions
2019-12-17 6:48 [PATCH] SH: Convert iounmap() macros to inline functions Kuninori Morimoto
2019-12-17 6:53 ` Sam Ravnborg
@ 2019-12-17 7:37 ` Kuninori Morimoto
1 sibling, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2019-12-17 7:37 UTC (permalink / raw)
To: linux-sh
Hi Sam
Thank you for your review
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > Macro iounmap() do nothing, but that results in
> > unused variable warnings all over the place.
> > This patch convert it to inline to avoid warning
>
> To help other people with the same warning it is always a good idea to
> include the warning you fix in the changelog.
>
> With this fixed:
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
will fix and post v2, Thanks
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-17 7:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 6:48 [PATCH] SH: Convert iounmap() macros to inline functions Kuninori Morimoto
2019-12-17 6:53 ` Sam Ravnborg
2019-12-17 7:37 ` Kuninori Morimoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.