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: 101852 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp547607qgf; Tue, 6 Sep 2016 06:24:55 -0700 (PDT) X-Received: by 10.66.189.104 with SMTP id gh8mr72213738pac.125.1473168295083; Tue, 06 Sep 2016 06:24:55 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qj2si35464674pac.7.2016.09.06.06.24.54; Tue, 06 Sep 2016 06:24:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754196AbcIFNYx (ORCPT + 4 others); 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 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") --- drivers/mfd/exynos-lpass.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);