From patchwork Thu Feb 25 14:33:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102684 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp193456lbc; Thu, 25 Feb 2016 06:34:36 -0800 (PST) X-Received: by 10.98.68.193 with SMTP id m62mr63461580pfi.130.1456410876195; Thu, 25 Feb 2016 06:34:36 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rd7si12886899pab.90.2016.02.25.06.34.35; Thu, 25 Feb 2016 06:34:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760422AbcBYOea (ORCPT + 1 other); Thu, 25 Feb 2016 09:34:30 -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 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0Lo5wv-1a1o5h0Ep7-00gD88; Thu, 25 Feb 2016 15:34:00 +0100 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-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@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(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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