Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753547AbbDATdu (ORCPT ); Wed, 1 Apr 2015 15:33:50 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:58067 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752910AbbDATdt (ORCPT ); Wed, 1 Apr 2015 15:33:49 -0400 From: Marc Kleine-Budde To: adi-buildroot-devel@lists.sourceforge.net Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org, Steven Miao , Marc Kleine-Budde Subject: [PATCH resend] blackfin: portmux: define proper no-ops for peripheral_* for CONFIG_PINCTRL=y Date: Wed, 1 Apr 2015 21:33:44 +0200 Message-Id: <1427916824-1513-1-git-send-email-mkl@pengutronix.de> X-Mailer: git-send-email 2.1.4 X-SA-Exim-Connect-IP: 2001:6f8:1178:4:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1731 Lines: 48 When compiling blackfin code with CONFIG_PINCTRL=y, several functions peripheral_* are no-oped by #define'ing them to nothing. This may lead to unused variable warning in the code that's using the peripheral_* function. This patch defines proper static inline no-op functions to fix these warnings. Signed-off-by: Marc Kleine-Budde --- arch/blackfin/include/asm/portmux.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/blackfin/include/asm/portmux.h b/arch/blackfin/include/asm/portmux.h index c8f0939419be..110a66bbc268 100644 --- a/arch/blackfin/include/asm/portmux.h +++ b/arch/blackfin/include/asm/portmux.h @@ -23,10 +23,20 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state); #define gpio_pint_regs bfin_pint_regs #define adi_internal_set_wake bfin_internal_set_wake -#define peripheral_request(per, label) (0) -#define peripheral_free(per) -#define peripheral_request_list(per, label) (0) -#define peripheral_free_list(per) +static inline int peripheral_request(unsigned short per, const char *label) +{ + return 0; +} +static inline void peripheral_free(unsigned short per) +{ +} +static inline int peripheral_request_list(const unsigned short per[], const char *label) +{ + return 0; +} +static inline void peripheral_free_list(const unsigned short per[]) +{ +} #else int peripheral_request(unsigned short per, const char *label); void peripheral_free(unsigned short per); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/