Message ID | 20220105085746.1116726-1-mkl@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | sh: make iounmap() a static inline again | expand |
On 05.01.2022 09:57:47, Marc Kleine-Budde wrote: > The patch > > | 98c90e5ea34e sh: remove __iounmap > > removed the __iounmap macro for the NOMMU case, but also converted the > static inline no-op iounmap() to a macro, resulting in lots of unused > variable warnings. > > This patch coverts the macro into a static inline function, similar to > previous patches in the sh arch: > > | 4580ba4ad2e6 sh: Convert iounmap() macros to inline functions > | 733f0025f0fb sh: prevent warnings when using iounmap The problem still exists in linus/master, can someone take this patch? regards, Marc > Fixes: 98c90e5ea34e ("sh: remove __iounmap") > Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > Cc: Sam Ravnborg <sam@ravnborg.org> > Cc: Geert Uytterhoeven <geert+renesas@glider.be> > Cc: Rich Felker <dalias@libc.org> > Cc: Yoshinori Sato <ysato@users.sourceforge.jp> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > --- > arch/sh/include/asm/io.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h > index cf9a3ec32406..4960b8ff1ad4 100644 > --- a/arch/sh/include/asm/io.h > +++ b/arch/sh/include/asm/io.h > @@ -271,7 +271,9 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size, > #endif /* CONFIG_HAVE_IOREMAP_PROT */ > > #else /* CONFIG_MMU */ > -#define iounmap(addr) do { } while (0) > +static inline void iounmap(void __iomem *addr) > +{ > +} > #define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) > #endif /* CONFIG_MMU */ > > -- > 2.34.1
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index cf9a3ec32406..4960b8ff1ad4 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -271,7 +271,9 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size, #endif /* CONFIG_HAVE_IOREMAP_PROT */ #else /* CONFIG_MMU */ -#define iounmap(addr) do { } while (0) +static inline void iounmap(void __iomem *addr) +{ +} #define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) #endif /* CONFIG_MMU */
The patch | 98c90e5ea34e sh: remove __iounmap removed the __iounmap macro for the NOMMU case, but also converted the static inline no-op iounmap() to a macro, resulting in lots of unused variable warnings. This patch coverts the macro into a static inline function, similar to previous patches in the sh arch: | 4580ba4ad2e6 sh: Convert iounmap() macros to inline functions | 733f0025f0fb sh: prevent warnings when using iounmap Fixes: 98c90e5ea34e ("sh: remove __iounmap") Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Rich Felker <dalias@libc.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> --- arch/sh/include/asm/io.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)