Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1688778
| From | Stanimir Varbanov <stanimir.varbanov@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/4] venus: mark PM functions as __maybe_unused |
| Date | 2017-07-17 11:00 +0200 |
| Message-ID | <u4a2L-2Ji-37@gated-at.bofh.it> (permalink) |
| References | <u4a2K-2Ji-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnd Bergmann <arnd@arndb.de>
Without PM support, gcc warns about two unused functions:
platform/qcom/venus/core.c:146:13: error: 'venus_clks_disable' defined but not used [-Werror=unused-function]
platform/qcom/venus/core.c:126:12: error: 'venus_clks_enable' defined but not used [-Werror=unused-function]
The problem as usual are incorrect #ifdefs, so the easiest fix
is to do away with the #ifdef completely and mark the suspend/resume
handlers as __maybe_unused, which they are.
Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
---
drivers/media/platform/qcom/venus/core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 776d2bae6979..694f57a78288 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -270,8 +270,7 @@ static int venus_remove(struct platform_device *pdev)
return ret;
}
-#ifdef CONFIG_PM
-static int venus_runtime_suspend(struct device *dev)
+static __maybe_unused int venus_runtime_suspend(struct device *dev)
{
struct venus_core *core = dev_get_drvdata(dev);
int ret;
@@ -283,7 +282,7 @@ static int venus_runtime_suspend(struct device *dev)
return ret;
}
-static int venus_runtime_resume(struct device *dev)
+static __maybe_unused int venus_runtime_resume(struct device *dev)
{
struct venus_core *core = dev_get_drvdata(dev);
int ret;
@@ -302,7 +301,6 @@ static int venus_runtime_resume(struct device *dev)
venus_clks_disable(core);
return ret;
}
-#endif
static const struct dev_pm_ops venus_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] Venus fixes for v4.13-rc1 Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-07-17 11:00 +0200 [PATCH 4/4] media: venus: hfi: fix error handling in hfi_sys_init_done() Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-07-17 11:00 +0200 [PATCH 2/4] media: venus: don't abuse dma_alloc for non-DMA allocations Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-07-17 11:00 +0200 [PATCH 1/4] venus: mark PM functions as __maybe_unused Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-07-17 11:00 +0200 [PATCH 3/4] venus: fix compile-test build on non-qcom ARM platform Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-07-17 11:00 +0200
csiph-web