* [PATCH] ARM: sa1100: make sa1100_register_uart_fns a function
@ 2016-02-23 14:34 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:34 UTC (permalink / raw)
Cc: linux-arm-kernel, Linus Walleij, Dmitry Eremin-Solenikov,
Arnd Bergmann, linux-kernel
Calling sa1100_register_uart_fns() leaves the port structure
unused when CONFIG_SERIAL_SA1100 is disabled, and we get a
compiler warning about that:
arch/arm/mach-sa1100/badge4.c:317:31: warning: 'badge4_port_fns' defined but not used [-Wunused-variable]
static struct sa1100_port_fns badge4_port_fns __initdata = {
This turns the two empty macros into empty inline functions,
which has the same effect, but lets the compiler know that the
variables are intentionally unused.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/platform_data/sa11x0-serial.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/platform_data/sa11x0-serial.h b/include/linux/platform_data/sa11x0-serial.h
index 4504d5d592f0..009e1d83fe39 100644
--- a/include/linux/platform_data/sa11x0-serial.h
+++ b/include/linux/platform_data/sa11x0-serial.h
@@ -26,8 +26,12 @@ struct sa1100_port_fns {
void sa1100_register_uart_fns(struct sa1100_port_fns *fns);
void sa1100_register_uart(int idx, int port);
#else
-#define sa1100_register_uart_fns(fns) do { } while (0)
-#define sa1100_register_uart(idx,port) do { } while (0)
+static inline void sa1100_register_uart_fns(struct sa1100_port_fns *fns)
+{
+}
+static inline void sa1100_register_uart(int idx, int port)
+{
+}
#endif
#endif
--
2.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ARM: sa1100: make sa1100_register_uart_fns a function
@ 2016-02-23 14:34 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-02-23 14:34 UTC (permalink / raw)
To: linux-arm-kernel
Calling sa1100_register_uart_fns() leaves the port structure
unused when CONFIG_SERIAL_SA1100 is disabled, and we get a
compiler warning about that:
arch/arm/mach-sa1100/badge4.c:317:31: warning: 'badge4_port_fns' defined but not used [-Wunused-variable]
static struct sa1100_port_fns badge4_port_fns __initdata = {
This turns the two empty macros into empty inline functions,
which has the same effect, but lets the compiler know that the
variables are intentionally unused.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/platform_data/sa11x0-serial.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/platform_data/sa11x0-serial.h b/include/linux/platform_data/sa11x0-serial.h
index 4504d5d592f0..009e1d83fe39 100644
--- a/include/linux/platform_data/sa11x0-serial.h
+++ b/include/linux/platform_data/sa11x0-serial.h
@@ -26,8 +26,12 @@ struct sa1100_port_fns {
void sa1100_register_uart_fns(struct sa1100_port_fns *fns);
void sa1100_register_uart(int idx, int port);
#else
-#define sa1100_register_uart_fns(fns) do { } while (0)
-#define sa1100_register_uart(idx,port) do { } while (0)
+static inline void sa1100_register_uart_fns(struct sa1100_port_fns *fns)
+{
+}
+static inline void sa1100_register_uart(int idx, int port)
+{
+}
#endif
#endif
--
2.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: sa1100: make sa1100_register_uart_fns a function
2016-02-23 14:34 ` Arnd Bergmann
@ 2016-02-25 13:18 ` Linus Walleij
-1 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2016-02-25 13:18 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-arm-kernel, Dmitry Eremin-Solenikov, linux-kernel
On Tue, Feb 23, 2016 at 3:34 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Calling sa1100_register_uart_fns() leaves the port structure
> unused when CONFIG_SERIAL_SA1100 is disabled, and we get a
> compiler warning about that:
>
> arch/arm/mach-sa1100/badge4.c:317:31: warning: 'badge4_port_fns' defined but not used [-Wunused-variable]
> static struct sa1100_port_fns badge4_port_fns __initdata = {
>
> This turns the two empty macros into empty inline functions,
> which has the same effect, but lets the compiler know that the
> variables are intentionally unused.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
> include/linux/platform_data/sa11x0-serial.h | 8 ++++++--
It looks like you should send this to Greg?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: sa1100: make sa1100_register_uart_fns a function
@ 2016-02-25 13:18 ` Linus Walleij
0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2016-02-25 13:18 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Feb 23, 2016 at 3:34 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Calling sa1100_register_uart_fns() leaves the port structure
> unused when CONFIG_SERIAL_SA1100 is disabled, and we get a
> compiler warning about that:
>
> arch/arm/mach-sa1100/badge4.c:317:31: warning: 'badge4_port_fns' defined but not used [-Wunused-variable]
> static struct sa1100_port_fns badge4_port_fns __initdata = {
>
> This turns the two empty macros into empty inline functions,
> which has the same effect, but lets the compiler know that the
> variables are intentionally unused.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
> include/linux/platform_data/sa11x0-serial.h | 8 ++++++--
It looks like you should send this to Greg?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ARM: sa1100: make sa1100_register_uart_fns a function
2016-02-25 13:18 ` Linus Walleij
@ 2016-02-25 14:34 ` Arnd Bergmann
-1 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-02-25 14:34 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Linus Walleij, Dmitry Eremin-Solenikov, linux-kernel
On Thursday 25 February 2016 14:18:44 Linus Walleij wrote:
> On Tue, Feb 23, 2016 at 3:34 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> > Calling sa1100_register_uart_fns() leaves the port structure
> > unused when CONFIG_SERIAL_SA1100 is disabled, and we get a
> > compiler warning about that:
> >
> > arch/arm/mach-sa1100/badge4.c:317:31: warning: 'badge4_port_fns' defined but not used [-Wunused-variable]
> > static struct sa1100_port_fns badge4_port_fns __initdata = {
> >
> > This turns the two empty macros into empty inline functions,
> > which has the same effect, but lets the compiler know that the
> > variables are intentionally unused.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> > include/linux/platform_data/sa11x0-serial.h | 8 ++++++--
>
> It looks like you should send this to Greg?
Yes, good point.
The file was traditionally under arch/arm (or include/asm-arm before
that), but considering it as part of the driver makes slightly
more sense now.
Sent out with a modified subject and your Ack to Greg now.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: sa1100: make sa1100_register_uart_fns a function
@ 2016-02-25 14:34 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-02-25 14:34 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday 25 February 2016 14:18:44 Linus Walleij wrote:
> On Tue, Feb 23, 2016 at 3:34 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>
> > Calling sa1100_register_uart_fns() leaves the port structure
> > unused when CONFIG_SERIAL_SA1100 is disabled, and we get a
> > compiler warning about that:
> >
> > arch/arm/mach-sa1100/badge4.c:317:31: warning: 'badge4_port_fns' defined but not used [-Wunused-variable]
> > static struct sa1100_port_fns badge4_port_fns __initdata = {
> >
> > This turns the two empty macros into empty inline functions,
> > which has the same effect, but lets the compiler know that the
> > variables are intentionally unused.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> > include/linux/platform_data/sa11x0-serial.h | 8 ++++++--
>
> It looks like you should send this to Greg?
Yes, good point.
The file was traditionally under arch/arm (or include/asm-arm before
that), but considering it as part of the driver makes slightly
more sense now.
Sent out with a modified subject and your Ack to Greg now.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-25 14:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-23 14:34 [PATCH] ARM: sa1100: make sa1100_register_uart_fns a function Arnd Bergmann
2016-02-23 14:34 ` Arnd Bergmann
2016-02-25 13:18 ` Linus Walleij
2016-02-25 13:18 ` Linus Walleij
2016-02-25 14:34 ` Arnd Bergmann
2016-02-25 14:34 ` Arnd Bergmann
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.