From patchwork Tue Sep 6 13:24:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9316843 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 1964E60752 for ; Tue, 6 Sep 2016 13:24:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EBC228D50 for ; Tue, 6 Sep 2016 13:24:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02ED328D54; Tue, 6 Sep 2016 13:24:55 +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=-4.5 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham 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 BC0FA28D50 for ; Tue, 6 Sep 2016 13:24:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754196AbcIFNYx (ORCPT ); Tue, 6 Sep 2016 09:24:53 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:62602 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754086AbcIFNYx (ORCPT ); Tue, 6 Sep 2016 09:24:53 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0LtWNA-1axzxB2RV6-010ryB; Tue, 06 Sep 2016 15:24:05 +0200 From: Arnd Bergmann To: Lee Jones Cc: Arnd Bergmann , Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas , Sylwester Nawrocki , Beomho Seo , Inha Song , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mfd: exynos-lpass: mark PM functions as __maybe_unused Date: Tue, 6 Sep 2016 15:24:00 +0200 Message-Id: <20160906132432.2083493-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:VzV8+vz2nZKWEppV/4S7e/MFnRMhqfjtl+QPc72/8uvyrLkV+PV /iqe7n3Dwg9WD3H+SilkHP72kprmUIu+7l5d72IyjNy+U6ndDX+ZiUzhsc08yvSCC99O2yS GGpKRv+eZlMGAaEyTOCfaWOUetIidyQfx2pyvSsvwr8VbfizMzLHAAScseWbk9wJDDj0WXJ CuatLYUku6MV3mOtex1+A== X-UI-Out-Filterresults: notjunk:1; V01:K0:HySnJvl8buQ=:kG/R5vB+XPyI+DgQsMiXWE fqGAclfBae28zeykiqWwufIxqk+uqZPatWQL8XMBJcTDxZH9X+xDbni2i//UQcvaP8RKtQSY3 iii9zlJMgW2vMNKDu6KOXeug9LWln8wo+Qftu3f9xfT12ySsRuLTHYHOkSK4SzHxib9zQYH88 zRALt2yjrSzHcF6ThBsVFSPuxzOU7m9czPSC1Y146U4UXbFlHbJN6ItqKxVTmu0wUIgbm7jUP VOBvqrWyrGbUmqHDDDeKPJmvIolSyWsDpQ/+Gi7SOY8ZaIEdXVNq7zeUeq0e5XJNu7N1hV+qX VmuzMIDxFAJrmlKY0+XNDV+af84w41Vm4z9TS9TCKXTFR2EbXCSwZqRbWj48EIM0VpCB1dlXj U/dZojAE7EWzWByU9iSCHmiMlw4wYwx4YGuNU9fbeIrmObeEqq1SoY6/7D3fzw/48MkzOWX5h Z0xD6TjhdRc5aeP3QYjSjabGObtdAP0qAjLHb3imAMerZZ04EPVmIO6ICZMg4s7O70Uyl2AWl UlpZ2+MOwJRJM3ctCexq/HEqGQ1oKC3/+TkUwkWKt03EWJZce9qt9XLKh0LOPVzyU6KqmNC9g ZOedpYDRiu6Yx5mMH8dgJAhwSxxXKDWOmoKwyA9aZLnzeOlUFswqQ457jZM/3pmc/Fw0luuGd I/Uti72f1p9UVynW9HMPu/PMFWIjyRGLWftCQdda9xvTgOjvzd963ISNtj/6BhRZFkVw= 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 newly added exynos lpass driver produces a build warning when CONFIG_PM is disabled since the only callers of exynos_lpass_disable are under an #ifdef: drivers/mfd/exynos-lpass.c:93:13: error: 'exynos_lpass_disable' defined but not used [-Werror=unused-function] static void exynos_lpass_disable(struct exynos_lpass *lpass) This removes the #ifdef and replaces it with __maybe_unused annotations so the compiler can leave out the unused code silently with less room for mistakes. Signed-off-by: Arnd Bergmann Fixes: 36c26760bba8 ("mfd: Add Samsung Exynos Low Power Audio Subsystem driver") Reviewed-by: Sylwester Nawrocki --- drivers/mfd/exynos-lpass.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 578ac7b57b96..2e064fb8826f 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -144,8 +144,7 @@ static int exynos_lpass_probe(struct platform_device *pdev) return of_platform_populate(dev->of_node, NULL, NULL, dev); } -#ifdef CONFIG_PM_SLEEP -static int exynos_lpass_suspend(struct device *dev) +static int __maybe_unused exynos_lpass_suspend(struct device *dev) { struct exynos_lpass *lpass = dev_get_drvdata(dev); @@ -154,7 +153,7 @@ static int exynos_lpass_suspend(struct device *dev) return 0; } -static int exynos_lpass_resume(struct device *dev) +static int __maybe_unused exynos_lpass_resume(struct device *dev) { struct exynos_lpass *lpass = dev_get_drvdata(dev); @@ -162,7 +161,6 @@ static int exynos_lpass_resume(struct device *dev) return 0; } -#endif static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend, exynos_lpass_resume);