[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1456238094-778916-1-git-send-email-arnd@arndb.de>
Date: Tue, 23 Feb 2016 15:34:45 +0100
From: Arnd Bergmann <arnd@...db.de>
To: unlisted-recipients:; (no To-header on input)
Cc: linux-arm-kernel@...ts.infradead.org,
Linus Walleij <linus.walleij@...aro.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org
Subject: [PATCH] ARM: sa1100: make sa1100_register_uart_fns a function
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@...db.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
Powered by blists - more mailing lists