From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760772AbcBYOeb (ORCPT ); Thu, 25 Feb 2016 09:34:31 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:53127 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760375AbcBYOe3 (ORCPT ); Thu, 25 Feb 2016 09:34:29 -0500 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Arnd Bergmann , Linus Walleij , linux-kernel@vger.kernel.org Subject: [PATCH] serial: sa1100: make sa1100_register_uart_fns a function Date: Thu, 25 Feb 2016 15:33:46 +0100 Message-Id: <1456410835-3808962-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:TiWKCVxYw+D4bdxYURbdaRW1WVurLhM3VntSbEMAve8DfNr/ZEu YX3wWI0oeWJJi+kqW7JBuP+Gh+k+hZgrHlLJE2foTuPX1m9qtA7OOwmBMH5eq4KfC3HfToj XEQYko6pBgG5VrCTmqH8l2H3Bc9GCGxdUVf/PzzVhV6LMv/BPLa5QBL+T1Yv2Zpcp1TFqwk lAqKscy9o7UDV6PLXA7+A== X-UI-Out-Filterresults: notjunk:1;V01:K0:kyi19cA1u+8=:Qba9Cjrkh3JdP0KGBcaapo RIDFFgSqQk3xDvDLHzdby+2ievluM3JCYIRH9C2VOQl7Oi2kiHj/h8wJlrJb3R8w4F3IHUDaM 1EA3SICRDgdS2Y1bpgXDmtWA6AyaLZMEDy0sLKUXgPeHz4dftjK9nHqcKC+P/9oFeVbdNCEBX ea0fnbxaOfindmdXzKN3jMFmAeKLXg7WdI4pTe6f5yeYy9Q3wUwDiO7M555p1fKDUQMOT4h4O GmlweSfL8GvfycpeeuEfoExQL9Wq8VXPaI7vLZqOGq7oCc+Mva6cSrL+D0bHlMMlGbSFXEd8j XnOPz7AF/hp5/wrt3H/0sD9zKhebGrNqF/HVs+NguYa+WMjzGjlxLlORNj++biP1me242+baH a/vxT5bStw7ynQhIZoNkBMVThjRrMR9UwoWPSnMsCgH08+wp47XcitIlUTDujsO50bA0DyMrB wuYb2XAqczhXjmjVBl8px+/OfDanR0qEuyUJ3hFU/CJDTWPAPyvo9/spw+XLLncREIUj+g+pT 7q3ebTdjAMb0khUsDLadPcQR/vUPCiSoBvKIwcNVMUrmgrlKvGVQY4XoX7almNwlI6frhZrW8 x1L8mFk23flNjcc7hcDRKnJKzY0U4zOfcM2aaS0mll3H3DkZ3jqJFOhSzy+NSu+EKzQI3iaio EvpT90sQwJbe2xSLCQ7fUFVp72OVwU2sXhqopvXUDSN689o6Nn5ibeHGBm1L3N7YRKLw= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Linus Walleij --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Thu, 25 Feb 2016 15:33:46 +0100 Subject: [PATCH] serial: sa1100: make sa1100_register_uart_fns a function Message-ID: <1456410835-3808962-1-git-send-email-arnd@arndb.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 Acked-by: Linus Walleij --- 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