Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756394AbcCBQGx (ORCPT ); Wed, 2 Mar 2016 11:06:53 -0500 Received: from eusmtp01.atmel.com ([212.144.249.242]:33767 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756313AbcCBQGu (ORCPT ); Wed, 2 Mar 2016 11:06:50 -0500 Subject: Re: [PATCH 01/14] pinctrl: at91: use __maybe_unused to hide pm functions To: Arnd Bergmann , Ludovic Desroches , Linus Walleij References: <1456934350-1389172-1-git-send-email-arnd@arndb.de> <1456934350-1389172-2-git-send-email-arnd@arndb.de> CC: , , From: Nicolas Ferre Organization: atmel Message-ID: <56D70FA2.30608@atmel.com> Date: Wed, 2 Mar 2016 17:06:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1456934350-1389172-2-git-send-email-arnd@arndb.de> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.161.30.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1790 Lines: 50 Le 02/03/2016 16:58, Arnd Bergmann a ?crit : > The at91-pio4 pinctrl driver uses SET_SYSTEM_SLEEP_PM_OPS() to > conditionally set the correct suspend/resume options, but they > become unused when CONFIG_PM is disabled: > > drivers/pinctrl/pinctrl-at91-pio4.c:827:12: error: 'atmel_pctrl_suspend' defined but not used [-Werror=unused-function] > drivers/pinctrl/pinctrl-at91-pio4.c:847:12: error: 'atmel_pctrl_resume' defined but not used [-Werror=unused-function] > > This adds __maybe_unused annotations so the compiler knows > it can silently drop them instead of warning. > > Signed-off-by: Arnd Bergmann Indeed, nice like this: Acked-by: Nicolas Ferre Thanks, bye. > --- > drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c > index ee69db6ae1c7..4429312e848d 100644 > --- a/drivers/pinctrl/pinctrl-at91-pio4.c > +++ b/drivers/pinctrl/pinctrl-at91-pio4.c > @@ -824,7 +824,7 @@ static struct pinctrl_desc atmel_pinctrl_desc = { > .pmxops = &atmel_pmxops, > }; > > -static int atmel_pctrl_suspend(struct device *dev) > +static int __maybe_unused atmel_pctrl_suspend(struct device *dev) > { > struct platform_device *pdev = to_platform_device(dev); > struct atmel_pioctrl *atmel_pioctrl = platform_get_drvdata(pdev); > @@ -844,7 +844,7 @@ static int atmel_pctrl_suspend(struct device *dev) > return 0; > } > > -static int atmel_pctrl_resume(struct device *dev) > +static int __maybe_unused atmel_pctrl_resume(struct device *dev) > { > struct platform_device *pdev = to_platform_device(dev); > struct atmel_pioctrl *atmel_pioctrl = platform_get_drvdata(pdev); > -- Nicolas Ferre