[PATCH] drm/rockchip: cdn-dp-core: Pass __maybe_unused for the suspend()/resume() hooks
Fabio Estevam
festevam at gmail.com
Fri Aug 21 14:34:29 UTC 2020
When building using a riscv allmodconfig the following build warning is
seen:
drivers/gpu/drm/rockchip/cdn-dp-core.c:1124:12: warning: 'cdn_dp_resume' defined but not used [-Wunused-function]
Pass __maybe_unused for the suspend()/resume() hooks to fix the build
warning when a defconfig does not select CONFIG_PM_SLEEP.
Reported-by: Olof's autobuilder <build at lixom.net>
Signed-off-by: Fabio Estevam <festevam at gmail.com>
---
drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index a4a45daf93f2..18e4de116630 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -1107,7 +1107,7 @@ static const struct component_ops cdn_dp_component_ops = {
.unbind = cdn_dp_unbind,
};
-static int cdn_dp_suspend(struct device *dev)
+static int __maybe_unused cdn_dp_suspend(struct device *dev)
{
struct cdn_dp_device *dp = dev_get_drvdata(dev);
int ret = 0;
@@ -1121,7 +1121,7 @@ static int cdn_dp_suspend(struct device *dev)
return ret;
}
-static int cdn_dp_resume(struct device *dev)
+static int __maybe_unused cdn_dp_resume(struct device *dev)
{
struct cdn_dp_device *dp = dev_get_drvdata(dev);
--
2.17.1
More information about the dri-devel
mailing list