From: Krzysztof Kozlowski <k.kozlowski@samsung.com> To: Matt Mackall <mpm@selenic.com>, Herbert Xu <herbert@gondor.apana.org.au>, Kukjin Kim <kgene@kernel.org>, 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 <k.kozlowski@samsung.com> Subject: [PATCH 1/5] hwrng: exynos - Hide PM functions with __maybe_unused Date: Fri, 11 Mar 2016 16:49:18 +0900 [thread overview] Message-ID: <1457682562-21219-1-git-send-email-k.kozlowski@samsung.com> (raw) 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 <k.kozlowski@samsung.com> --- 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) -- 2.5.0
WARNING: multiple messages have this Message-ID (diff)
From: k.kozlowski@samsung.com (Krzysztof Kozlowski) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/5] hwrng: exynos - Hide PM functions with __maybe_unused Date: Fri, 11 Mar 2016 16:49:18 +0900 [thread overview] Message-ID: <1457682562-21219-1-git-send-email-k.kozlowski@samsung.com> (raw) 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 <k.kozlowski@samsung.com> --- 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) -- 2.5.0
next reply other threads:[~2016-03-11 7:49 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-03-11 7:49 Krzysztof Kozlowski [this message] 2016-03-11 7:49 ` [PATCH 1/5] hwrng: exynos - Hide PM functions with __maybe_unused Krzysztof Kozlowski 2016-03-11 7:49 ` [PATCH 2/5] hwrng: exynos - Runtime suspend device after init Krzysztof Kozlowski 2016-03-11 7:49 ` Krzysztof Kozlowski 2016-03-11 7:49 ` [PATCH 3/5] hwrng: exynos - Fix unbalanced PM runtime put on timeout error path Krzysztof Kozlowski 2016-03-11 7:49 ` Krzysztof Kozlowski 2016-03-11 7:49 ` [PATCH 4/5] hwrng: exynos - Disable runtime PM on probe failure Krzysztof Kozlowski 2016-03-11 7:49 ` Krzysztof Kozlowski 2016-03-11 7:49 ` [PATCH 5/5] hwrng: exynos - Disable runtime PM on driver unbind Krzysztof Kozlowski 2016-03-11 7:49 ` Krzysztof Kozlowski 2016-03-12 5:26 ` Krzysztof Kozlowski 2016-03-12 5:26 ` Krzysztof Kozlowski 2016-03-12 4:55 ` [PATCH 1/5] hwrng: exynos - Hide PM functions with __maybe_unused Krzysztof Kozlowski 2016-03-12 4:55 ` Krzysztof Kozlowski
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1457682562-21219-1-git-send-email-k.kozlowski@samsung.com \ --to=k.kozlowski@samsung.com \ --cc=herbert@gondor.apana.org.au \ --cc=kgene@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-crypto@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=mpm@selenic.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.