[PATCH v1 2/2] drm/rockchip: fix warning from cdn_dp_resume

Sam Ravnborg sam at ravnborg.org
Fri Sep 25 21:55:24 UTC 2020


Commit 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static")
introduced the following warning in some builds:

cdn-dp-core.c:1124:12: warning: ‘cdn_dp_resume’ defined but not used
 1124 | static int cdn_dp_resume(struct device *dev)
      |            ^~~~~~~~~~~~~

Fix this by defining cdn_dp_resume __maybe_unused

Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
Fixes: 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static")
Cc: Enric Balletbo i Serra <enric.balletbo at collabora.com>
Cc: Heiko Stuebner <heiko at sntech.de>
Cc: Sandy Huang <hjc at rock-chips.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-rockchip at lists.infradead.org
Cc: <stable at vger.kernel.org> # v5.8+
---
 drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index a4a45daf93f2..1162e321aaed 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -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.25.1



More information about the dri-devel mailing list