From patchwork Wed Mar 2 15:58:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102611 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2462085lbc; Wed, 2 Mar 2016 08:03:48 -0800 (PST) X-Received: by 10.98.1.197 with SMTP id 188mr39753272pfb.8.1456934628705; Wed, 02 Mar 2016 08:03:48 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ll1si36059180pab.144.2016.03.02.08.03.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:03:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9EU-0003mQ-QH; Wed, 02 Mar 2016 16:02:38 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9CZ-0001Le-48 for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:41 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0M1QSH-1ZmTW60obB-00tVGC; Wed, 02 Mar 2016 17:00:03 +0100 From: Arnd Bergmann To: Matt Mackall , Herbert Xu , Kukjin Kim , Krzysztof Kozlowski Subject: [PATCH 07/14] hw_random: exynos: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:58:59 +0100 Message-Id: <1456934350-1389172-8-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:tebVe36ilacPLx/VE6A2BkCsNsUw8GFlvi/Dak6IS/37f+D6r5J klGKDhGiRxKygafT7SXBbw/XXwSkmdX50SNPoKSpOa3h8P0sArUyV3BH0Qs+2pqBNZeXxFf l1UxaRkIEWKr3S2810hM8paZtkdJv0PZyxiG0dFEFAhLp3OQ2KSjNz9g14FE6rwjCDK5HeY 42OsAl4LY8IjKePa8dYtw== X-UI-Out-Filterresults: notjunk:1; V01:K0:M+OB3geWSnI=:cRwl4ua7NIJ4sNJ0Ri4gaz cD7rvFiujmhcTBc+OTlZXM3EjiYeOPXpmV74aZcZMsfDlLZ99CXAT9DGSB7Mxzd/LlDN4UZ2L NjZFLfiErJqXEGFIhHIbxcYNADDX2Wye+exAf6SUP7iF6lH3zNm18dIsQc5jgdXhwavh6A30I tR1yXcI4sB8eP8Nzo6T8+ZAoahLMUlPdhK84hy60pf53grj9QunEicK+venv7NsOha8hE1+Kb G6hT1iGPsblStozT1x7p7XNj9LWlVtWCgS5UxmkWwd0id2pZ7tMRKAgsa6Sm+tgUParcj40X0 bINHNlCuZ9gTqNSkU98mPcpw21mhm1iUJrQo4vyLnNPWmm/26/TfpZuuytcDlE9AnRlDs4khG Gj2rbDp2hn1WWVQCoakkEIMnudUQjXIVPde0XLWDe3LttpH14v8Zfat95MsdVsF8S+Eq1H0vK dAqiUo1U8zRBaLTJvm4GF4DX+X2W9FjouvkUlAsiA+PjBu8j1sZFeptJkV8rqndBkKQY4ZE2G O21tUikvpvJr96vHjBvlqRrOOf9d/Vwwh01ig5stih4pQb50L4AiOUWmwicJdM1EHl8v5uB72 tYZG/ee+YDCvdVsvUY5Rx4NdwLgmULrV+9dLKvOWZuYrChq5AEyM8oB6reDP1H5J5Oqenu4hC jJZDmt2nxWVTtuBleBfQCdxmV+limC0WLCtcVIY2TbtENtBtfi441T3N1PXUc2QVWoCU= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080039_626493_91C2F521 X-CRM114-Status: GOOD ( 12.36 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [217.72.192.75 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.72.192.75 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Thompson , linux-samsung-soc@vger.kernel.org, Arnd Bergmann , Dmitry Torokhov , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The exynos random driver uses #ifdef to check for CONFIG_PM, but then uses SIMPLE_DEV_PM_OPS, which leaves the references out when CONFIG_PM_SLEEP is not defined, so we get a warning with PM=y && PM_SLEEP=n: drivers/char/hw_random/exynos-rng.c:166:12: error: 'exynos_rng_suspend' defined but not used [-Werror=unused-function] drivers/char/hw_random/exynos-rng.c:171:12: error: 'exynos_rng_resume' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/char/hw_random/exynos-rng.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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)