* [PATCH] SH: Convert ins[bwl]/outs[bwl] macros to inline functions
@ 2019-12-17 6:50 Kuninori Morimoto
2019-12-17 7:48 ` Kuninori Morimoto
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2019-12-17 6:50 UTC (permalink / raw)
To: linux-sh
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Macro ins[bwl]/outs[bwl] are just calling BUG(), but that results in
unused variable warnings all over the place.
This patch convert macro to inline to avoid warning
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/sh/include/asm/io_noioport.h | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/arch/sh/include/asm/io_noioport.h b/arch/sh/include/asm/io_noioport.h
index 90d6109..d39a1a8 100644
--- a/arch/sh/include/asm/io_noioport.h
+++ b/arch/sh/include/asm/io_noioport.h
@@ -53,12 +53,34 @@ static inline void ioport_unmap(void __iomem *addr)
#define outw_p(x, addr) outw((x), (addr))
#define outl_p(x, addr) outl((x), (addr))
-#define insb(a, b, c) BUG()
-#define insw(a, b, c) BUG()
-#define insl(a, b, c) BUG()
+static inline void insb (unsigned long port, void *dst, unsigned long count)
+{
+ BUG();
+}
+
+static inline void insw (unsigned long port, void *dst, unsigned long count)
+{
+ BUG();
+}
+
+static inline void insl (unsigned long port, void *dst, unsigned long count)
+{
+ BUG();
+}
-#define outsb(a, b, c) BUG()
-#define outsw(a, b, c) BUG()
-#define outsl(a, b, c) BUG()
+static inline void outsb (unsigned long port, const void *src, unsigned long count)
+{
+ BUG();
+}
+
+static inline void outsw (unsigned long port, const void *src, unsigned long count)
+{
+ BUG();
+}
+
+static inline void outsl (unsigned long port, const void *src, unsigned long count)
+{
+ BUG();
+}
#endif /* __ASM_SH_IO_NOIOPORT_H */
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] SH: Convert ins[bwl]/outs[bwl] macros to inline functions
2019-12-17 6:50 [PATCH] SH: Convert ins[bwl]/outs[bwl] macros to inline functions Kuninori Morimoto
@ 2019-12-17 7:48 ` Kuninori Morimoto
2019-12-17 10:18 ` Sergei Shtylyov
2019-12-18 1:04 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2019-12-17 7:48 UTC (permalink / raw)
To: linux-sh
Hi
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Macro ins[bwl]/outs[bwl] are just calling BUG(), but that results in
> unused variable warnings all over the place.
> This patch convert macro to inline to avoid warning
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
I will post v2 patch soon.
Please drop it
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] SH: Convert ins[bwl]/outs[bwl] macros to inline functions
2019-12-17 6:50 [PATCH] SH: Convert ins[bwl]/outs[bwl] macros to inline functions Kuninori Morimoto
2019-12-17 7:48 ` Kuninori Morimoto
@ 2019-12-17 10:18 ` Sergei Shtylyov
2019-12-18 1:04 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2019-12-17 10:18 UTC (permalink / raw)
To: linux-sh
Hello!
On 17.12.2019 9:50, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Macro ins[bwl]/outs[bwl] are just calling BUG(), but that results in
> unused variable warnings all over the place.
> This patch convert macro to inline to avoid warning
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/sh/include/asm/io_noioport.h | 34 ++++++++++++++++++++++++++++------
> 1 file changed, 28 insertions(+), 6 deletions(-)
>
> diff --git a/arch/sh/include/asm/io_noioport.h b/arch/sh/include/asm/io_noioport.h
> index 90d6109..d39a1a8 100644
> --- a/arch/sh/include/asm/io_noioport.h
> +++ b/arch/sh/include/asm/io_noioport.h
> @@ -53,12 +53,34 @@ static inline void ioport_unmap(void __iomem *addr)
> #define outw_p(x, addr) outw((x), (addr))
> #define outl_p(x, addr) outl((x), (addr))
>
> -#define insb(a, b, c) BUG()
> -#define insw(a, b, c) BUG()
> -#define insl(a, b, c) BUG()
> +static inline void insb (unsigned long port, void *dst, unsigned long count)
Why this space after the function name? I don't think scripts/checkpatch.pl
is happy about it...
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] SH: Convert ins[bwl]/outs[bwl] macros to inline functions
2019-12-17 6:50 [PATCH] SH: Convert ins[bwl]/outs[bwl] macros to inline functions Kuninori Morimoto
2019-12-17 7:48 ` Kuninori Morimoto
2019-12-17 10:18 ` Sergei Shtylyov
@ 2019-12-18 1:04 ` Kuninori Morimoto
2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2019-12-18 1:04 UTC (permalink / raw)
To: linux-sh
Hi Sergei
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > Macro ins[bwl]/outs[bwl] are just calling BUG(), but that results in
> > unused variable warnings all over the place.
> > This patch convert macro to inline to avoid warning
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
(snip)
> > +static inline void insb (unsigned long port, void *dst, unsigned long count)
>
> Why this space after the function name? I don't think scripts/checkpatch.pl
> is happy about it...
Indeed.
will post v2 patch
Thank you for your help !!
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-18 1:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 6:50 [PATCH] SH: Convert ins[bwl]/outs[bwl] macros to inline functions Kuninori Morimoto
2019-12-17 7:48 ` Kuninori Morimoto
2019-12-17 10:18 ` Sergei Shtylyov
2019-12-18 1:04 ` 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.