From patchwork Wed Mar 2 15:59:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102614 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2461476lbc; Wed, 2 Mar 2016 08:02:45 -0800 (PST) X-Received: by 10.66.146.39 with SMTP id sz7mr39980463pab.76.1456934565788; Wed, 02 Mar 2016 08:02:45 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q14si34827304par.57.2016.03.02.08.02.45; Wed, 02 Mar 2016 08:02:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755876AbcCBQCi (ORCPT + 30 others); Wed, 2 Mar 2016 11:02:38 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:59434 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932095AbcCBQAu (ORCPT ); Wed, 2 Mar 2016 11:00:50 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0Lfp8c-1a8B6V2pb8-00pKXD; Wed, 02 Mar 2016 17:00:37 +0100 From: Arnd Bergmann To: Dmitry Torokhov Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Shawn Guo , Robin Gong , 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 Date: Wed, 2 Mar 2016 16:59:04 +0100 Message-Id: <1456934350-1389172-13-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456934350-1389172-1-git-send-email-arnd@arndb.de> References: <1456934350-1389172-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:JTPlhiyb0sF3yicLhs9Ck0Ze0x/SK8Fob0OYaZ6dYSxmmnFDXE+ U7tMOLijtgo8PBdB9b6akLnnLHmXBhL1SH3491yuIOlhG2WgCb5yvUud076VFw/qXezdZRK TloNGrmpaoJiJU4fib2VoeKVvVb+S6h+eSew9T1BGBITbWBFps2hoa03U0/CYCI6ZKikHuc unhHT6rr9IXmfl+zdkxFw== X-UI-Out-Filterresults: notjunk:1; V01:K0:uE/2jO2dkPI=:ZW6WHiVSCdE4bXvBFo96HD u475MErREkcoHpPhI77ZNxqPUualcGrLu4nm1d6Uvp4e0TJJnE5E13gXCRv2vHRgrg/CadXAk 9z1O0MqpAoNTLF/P7LitYXCUuWxBk1FOVcTFc1tHbCc/ed7/i/E8uGmqD9pOCxQSGmh4YcrLw wk7P9mdZr2dESZdVqcyLMXeNPFjoWCYRgnfRcJUwaiZr8kvfZj4fXhwy8J+OKuEKu5r8Yhw3c OheQY6xzNF50wtALZoLnHtVWkdNP6oOSRW7Pou9NHUeiZpU6gTq2bWZ9JiAgjQVc8ZQ1jHUzj OwOvzgQXCSNiA4x+/JxttfEbctxKQon+III6+hSjnsu/4wyShXm2OlwxlIUbe2G+tjDkgEnph /AqemQ5A14pluykfSK2JyZdhRcKXm+7Xm03Nyc16ODWlqNLDHdGuEu3Hk8EzLp1MEMn7c3Qs7 YOlbsYTn3IdZr0IPhb6/EPuQQ+HqHyPj+3P0kxOfL7jZFxTH0ojj2YEuGkXqB1ZVbglxsMIpO wNUJBpD8H31oGpfE2hPX5jc3hcYK6/dAWhOTFbUxJLyjM+HOn3S2VPK85YI37tP3E7fBQbvtF 0hZ6+69gvLPD51afigFPOdPmvlrBpH/jnClcImQ9luDhW3fVcN1NmOcRe5IHFxmT0pjmm3v3a +JOpOkhq7kzKilGseK4Wdt1R4GWfRrY1UCev3lZvmWIY6UjVW9FFyuyQJUuf6kRsbkV0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/input/keyboard/snvs_pwrkey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.0 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);