Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755343AbcCBRMo (ORCPT ); Wed, 2 Mar 2016 12:12:44 -0500 Received: from mail-pf0-f176.google.com ([209.85.192.176]:33779 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755166AbcCBRMm (ORCPT ); Wed, 2 Mar 2016 12:12:42 -0500 Date: Wed, 2 Mar 2016 09:12:38 -0800 From: Dmitry Torokhov To: Frank Li Cc: Arnd Bergmann , "linux-arm-kernel@lists.infradead.org" , Shawn Guo , "b38343@freescale.com" , Javier Martinez Canillas , Frank Li , "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide pm functions Message-ID: <20160302171238.GA4318@dtor-ws> References: <1456934350-1389172-1-git-send-email-arnd@arndb.de> <1456934350-1389172-13-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2507 Lines: 68 On Wed, Mar 02, 2016 at 04:04:46PM +0000, Frank Li wrote: > > > > -----Original Message----- > > From: Arnd Bergmann [mailto:arnd@arndb.de] > > Sent: Wednesday, March 02, 2016 9:59 AM > > To: Dmitry Torokhov > > Cc: linux-arm-kernel@lists.infradead.org; Arnd Bergmann ; > > Shawn Guo ; b38343@freescale.com; Javier > > Martinez Canillas ; Frank Li > > ; linux-input@vger.kernel.org; linux- > > kernel@vger.kernel.org > > Subject: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide > > pm functions > > > > The SNVS power key driver has suspend/resume functions that are accessed > > using SIMPLE_DEV_PM_OPS, which hide the reference when > > CONFIG_PM_SLEEP is not set, resulting in a warning about unused functions: > > > > drivers/input/keyboard/snvs_pwrkey.c:183:12: error: > > 'imx_snvs_pwrkey_suspend' defined but not used [-Werror=unused-function] > > drivers/input/keyboard/snvs_pwrkey.c:194:12: error: > > 'imx_snvs_pwrkey_resume' defined but not used [-Werror=unused-function] > > > > This adds __maybe_unused annotations to let the compiler know it can > > silently drop the function definition. > > > > Signed-off-by: Arnd Bergmann > > Acked-by: Frank Li Applied, thank you. > > > --- > > drivers/input/keyboard/snvs_pwrkey.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/input/keyboard/snvs_pwrkey.c > > b/drivers/input/keyboard/snvs_pwrkey.c > > index 9adf13a5864a..b0ffadeb208c 100644 > > --- a/drivers/input/keyboard/snvs_pwrkey.c > > +++ b/drivers/input/keyboard/snvs_pwrkey.c > > @@ -180,7 +180,7 @@ static int imx_snvs_pwrkey_probe(struct > > platform_device *pdev) > > return 0; > > } > > > > -static int imx_snvs_pwrkey_suspend(struct device *dev) > > +static int __maybe_unused imx_snvs_pwrkey_suspend(struct device *dev) > > { > > struct platform_device *pdev = to_platform_device(dev); > > struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); @@ - > > 191,7 +191,7 @@ static int imx_snvs_pwrkey_suspend(struct device *dev) > > return 0; > > } > > > > -static int imx_snvs_pwrkey_resume(struct device *dev) > > +static int __maybe_unused imx_snvs_pwrkey_resume(struct device *dev) > > { > > struct platform_device *pdev = to_platform_device(dev); > > struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); > > -- > > 2.7.0 > -- Dmitry