From patchwork Wed Feb 1 16:16:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9550055 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4C30B60424 for ; Wed, 1 Feb 2017 16:17:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E57627DF9 for ; Wed, 1 Feb 2017 16:17:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3305928446; Wed, 1 Feb 2017 16:17:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E40F527DF9 for ; Wed, 1 Feb 2017 16:17:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751037AbdBAQRS (ORCPT ); Wed, 1 Feb 2017 11:17:18 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:61653 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750936AbdBAQRR (ORCPT ); Wed, 1 Feb 2017 11:17:17 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MRUgC-1d1eVb005o-00ShaK; Wed, 01 Feb 2017 17:16:39 +0100 From: Arnd Bergmann To: Linus Walleij Cc: Arnd Bergmann , Tomasz Figa , Krzysztof Kozlowski , Sylwester Nawrocki , Marek Szyprowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] pinctrl: samsung: mark PM functions as __maybe_unused Date: Wed, 1 Feb 2017 17:16:24 +0100 Message-Id: <20170201161636.2109091-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:hnYuewqUar8zqaxOUWNGaFUf26Doku4aVv7hP3IbRSps24pF6+o /w2pe03xxFitzDBKRUxbl0cVfN6LLwv7K6u049VX30Juy53i9pB1Z+Q7vzKLj1n/tztHCr4 TvTqBf1Im65x4B0PzwOBvGqfg/OUNY/vEZIPyN5DBSuAvik36x24JS9fFYHkqO5DqfdFhtJ HQYzcnBpTREL9LbooB4kw== X-UI-Out-Filterresults: notjunk:1; V01:K0:RaB1Hp7MBGs=:Sb2vid442mpqkNmiQhR09d 6IfyTIK9RYixNzeU4hplx/SgtP34aEozT/fMG5cUz0+VzyTlLX8nTQRWFIGeGBKWFyvAz3FKs o5s8g/2/k7yfBPG9baHjsig4edvIBExsTaKgZkmQIJjgLMtmEtu619WPFYvaW+JkngniV8b6s wrwNt7dEKuHnvFeYqHbGZbkhR+oO4fvDZpWybWLcZ4eZNn3+pntjaSPAtPt6cVSzxwkUQyv5r 1qcfmIaUMwpkS/S6rS47JkzfuaELHllyw7UJBaZli+K9rp3xJVODnUFfKEcSI3nkB6opGPmUE goLg5OZTT3giAgKSN+vH/meW1j234kWBAD/7QilIajnuQmEjrf5SygSUC1CqsW8MLoV7Ti6Yi 7L0Ablw+PIALosF1YE9oj8a7O1dl9plUPGbZLQ3n8XNkPPMzoeqpzwu4E267OE5UBwg1QXMjI mCw75rsXx3OApSv0zAgqvdaGmbhD6v1SUeovclQlRlcDIKZZoUUezr1fGq6Trb2B/xXOQxlAy 7AVcBHWb9gfKUvU1H6iscfBAEeIYaz50SpG4CyINX28YfTJ/O4tvWF+6X7bXe9jfBVbjHybcT +hRbjZnUS80lCqmzE8S/rQmDDz63i8vquf9x1FoJ4R9GcmTdiqoPjOxiT/w13oU0WxET25Tdh 7vF65iaLB6zZZMoainZAz/kCcCzjLM8VpY2TL0sZIGdV8ePPgVNmyArF/+0xaWDqbcRI= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The rework of the suspend/resume handling uses the wrong #ifdef check, leading to a build warning without CONFIG_PM_SLEEP: drivers/pinctrl/samsung/pinctrl-samsung.c:1142:12: error: 'samsung_pinctrl_resume' defined but not used [-Werror=unused-function] drivers/pinctrl/samsung/pinctrl-samsung.c:1092:12: error: 'samsung_pinctrl_suspend' defined but not used [-Werror=unused-function] Using a __maybe_unused annotation instead of the #ifdef is a simple way to avoid this problem class. Fixes: 2b24efa8e5c5 ("pinctrl: samsung: Replace syscore ops with standard platform device pm_ops") Signed-off-by: Arnd Bergmann Acked-by: Marek Szyprowski --- drivers/pinctrl/samsung/pinctrl-samsung.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index d79eadad6c5f..d601b5303e73 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c @@ -1083,13 +1083,12 @@ static int samsung_pinctrl_probe(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM /** * samsung_pinctrl_suspend - save pinctrl state for suspend * * Save data for all banks handled by this device. */ -static int samsung_pinctrl_suspend(struct device *dev) +static int __maybe_unused samsung_pinctrl_suspend(struct device *dev) { struct samsung_pinctrl_drv_data *drvdata = dev_get_drvdata(dev); int i; @@ -1139,7 +1138,7 @@ static int samsung_pinctrl_suspend(struct device *dev) * We don't bother doing anything complicated to avoid glitching lines since * we're called before pad retention is turned off. */ -static int samsung_pinctrl_resume(struct device *dev) +static int __maybe_unused samsung_pinctrl_resume(struct device *dev) { struct samsung_pinctrl_drv_data *drvdata = dev_get_drvdata(dev); int i; @@ -1183,7 +1182,6 @@ static int samsung_pinctrl_resume(struct device *dev) return 0; } -#endif static const struct of_device_id samsung_pinctrl_dt_match[] = { #ifdef CONFIG_PINCTRL_EXYNOS