From patchwork Fri Mar 11 07:49:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 8562751 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F28A39F46A for ; Fri, 11 Mar 2016 07:49:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2791520268 for ; Fri, 11 Mar 2016 07:49:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0069E20375 for ; Fri, 11 Mar 2016 07:49:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934266AbcCKHtk (ORCPT ); Fri, 11 Mar 2016 02:49:40 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:10453 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934259AbcCKHtj (ORCPT ); Fri, 11 Mar 2016 02:49:39 -0500 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O3V00ACO72N7560@mailout2.w1.samsung.com>; Fri, 11 Mar 2016 07:49:36 +0000 (GMT) X-AuditID: cbfec7f5-f79b16d000005389-52-56e2788f744d Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 57.5F.21385.F8872E65; Fri, 11 Mar 2016 07:49:35 +0000 (GMT) Content-transfer-encoding: 8BIT Received: from localhost.localdomain ([10.113.63.52]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O3V00KWE72HYU40@eusync2.samsung.com>; Fri, 11 Mar 2016 07:49:35 +0000 (GMT) From: Krzysztof Kozlowski To: Matt Mackall , Herbert Xu , Kukjin Kim , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/5] hwrng: exynos - Hide PM functions with __maybe_unused Date: Fri, 11 Mar 2016 16:49:18 +0900 Message-id: <1457682562-21219-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 2.5.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOLMWRmVeSWpSXmKPExsVy+t/xK7r9FY/CDJbusLDofiVj8fqFoUX/ 49fMFpseX2O1uH/vJ5PF5V1z2CxmnN/HZLFgWx+jA4fHtgOqHptWdbJ5bF5S79G3ZRWjR9/L DYwenzfJBbBFcdmkpOZklqUW6dslcGX8+j6XsaBLuKL/zWq2BsatAl2MnBwSAiYSE+YvYYKw xSQu3FvP1sXIxSEksJRRYtPTD2wgCV4BQYkfk++xdDFycDALyEscuZQNEmYWUJeYNG8RM0T9 f0aJS1PegNWzCRhLbF6+BGyQiMA3RokfD88xQnQYSvx894cdxBYW8JJ4vK+DFcRmEVCV6Ds7 gRFkAa+Au8TWWwEgpoSAnMSCC+kTGPlmIbliFsIVs5BcsYCReRWjaGppckFxUnqukV5xYm5x aV66XnJ+7iZGSPB+3cG49JjVIUYBDkYlHt4P1x6GCbEmlhVX5h5ilOBgVhLhzSx+FCbEm5JY WZValB9fVJqTWnyIUZqDRUmcd+au9yFCAumJJanZqakFqUUwWSYOTqkGxlvbN+hkWNZKBYrf evWQ+bGy8/4jr0+Y3jS0LHjQun56+/oY5soz+d7L3ZfveNzcnHV07TTJvlpeM/f9v15EJYiq 7TGI7V/nN3cv9+/npm+nNd2Iu31DZur57S9efZ7G1G2hfL8+IfSspdGz6dGRJoazzkhaSuWn X2M+dNK78uvs5WVi7tJntiixFGckGmoxFxUnAgC+M/j5WgIAAA== Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace ifdef with __maybe_unused to silence compiler warning on when SUSPEND=n and PM=y: drivers/char/hw_random/exynos-rng.c:166:12: warning: ‘exynos_rng_suspend’ defined but not used [-Wunused-function] static int exynos_rng_suspend(struct device *dev) ^ drivers/char/hw_random/exynos-rng.c:171:12: warning: ‘exynos_rng_resume’ defined but not used [-Wunused-function] static int exynos_rng_resume(struct device *dev) Signed-off-by: Krzysztof Kozlowski --- drivers/char/hw_random/exynos-rng.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index 30cf4623184f..ada081232528 100644 --- a/drivers/char/hw_random/exynos-rng.c +++ b/drivers/char/hw_random/exynos-rng.c @@ -144,8 +144,7 @@ static int exynos_rng_probe(struct platform_device *pdev) return devm_hwrng_register(&pdev->dev, &exynos_rng->rng); } -#ifdef CONFIG_PM -static int exynos_rng_runtime_suspend(struct device *dev) +static int __maybe_unused exynos_rng_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_rng *exynos_rng = platform_get_drvdata(pdev); @@ -155,7 +154,7 @@ static int exynos_rng_runtime_suspend(struct device *dev) return 0; } -static int exynos_rng_runtime_resume(struct device *dev) +static int __maybe_unused exynos_rng_runtime_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_rng *exynos_rng = platform_get_drvdata(pdev); @@ -163,12 +162,12 @@ static int exynos_rng_runtime_resume(struct device *dev) return clk_prepare_enable(exynos_rng->clk); } -static int exynos_rng_suspend(struct device *dev) +static int __maybe_unused exynos_rng_suspend(struct device *dev) { return pm_runtime_force_suspend(dev); } -static int exynos_rng_resume(struct device *dev) +static int __maybe_unused exynos_rng_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_rng *exynos_rng = platform_get_drvdata(pdev); @@ -180,7 +179,6 @@ static int exynos_rng_resume(struct device *dev) return exynos_rng_configure(exynos_rng); } -#endif static const struct dev_pm_ops exynos_rng_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(exynos_rng_suspend, exynos_rng_resume)