Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754802AbcCBQiN (ORCPT ); Wed, 2 Mar 2016 11:38:13 -0500 Received: from mail-am1on0092.outbound.protection.outlook.com ([157.56.112.92]:2048 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751665AbcCBQiL convert rfc822-to-8bit (ORCPT ); Wed, 2 Mar 2016 11:38:11 -0500 X-Greylist: delayed 1131 seconds by postgrey-1.27 at vger.kernel.org; Wed, 02 Mar 2016 11:38:10 EST From: Frank Li To: Arnd Bergmann , Dmitry Torokhov CC: "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 Thread-Topic: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide pm functions Thread-Index: AQHRdJyzMOTs85WOmkStESfa7acfVZ9GUQ4w Date: Wed, 2 Mar 2016 16:04:46 +0000 Message-ID: References: <1456934350-1389172-1-git-send-email-arnd@arndb.de> <1456934350-1389172-13-git-send-email-arnd@arndb.de> In-Reply-To: <1456934350-1389172-13-git-send-email-arnd@arndb.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arndb.de; dkim=none (message not signed) header.d=none;arndb.de; dmarc=none action=none header.from=nxp.com; x-originating-ip: [192.88.168.50] x-microsoft-exchange-diagnostics: 1;AMSPR04MB261;5:1FVYqYJRGxjAO0eJ/UdyMH9qUEyukUso512bA+ZVnH74maVz22DHArCDq/61qAXaCyqQSmDMyz+31i2na0yUTbZbArlp9m/zRwFRqHg7qJHJ2Ply84jbqdMpmeavSGDrglWioPcWl42vm9+BxQ58Qw==;24:xgRp+TCu2VZKdCDwEApnF2PKVU34K0sc7H2ZpfWc0i1lpXwTMiFv8QI8j5XKJRfesGWyHQoAxCMJVh+A1LwjN9rW+BanVqOtmC+Fkyc4s0g= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AMSPR04MB261; x-ms-office365-filtering-correlation-id: 8ee641e1-7b68-4049-0510-08d342b46065 x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:AMSPR04MB261;BCL:0;PCL:0;RULEID:;SRVR:AMSPR04MB261; x-forefront-prvs: 086943A159 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(377454003)(13464003)(106116001)(5002640100001)(86362001)(575784001)(92566002)(66066001)(5003600100002)(81156010)(5001770100001)(19580395003)(11100500001)(102836003)(40100003)(74316001)(6116002)(5008740100001)(4326007)(3846002)(5004730100002)(189998001)(1220700001)(33656002)(77096005)(5001960100004)(10400500002)(76176999)(586003)(54356999)(76576001)(2950100001)(19580405001)(87936001)(3660700001)(122556002)(2906002)(50986999)(2900100001)(3280700002)(1096002)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:AMSPR04MB261;H:AMSPR04MB263.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2016 16:04:46.7214 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AMSPR04MB261 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2292 Lines: 60 > -----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 > --- > 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