drm/rockchip: fix a -Werror fail on !CONFIG_PM_SLEEP
Subsystems (4)
PATCH 1/1 drm/rockchip: fix a -Werror fail on !CONFIG_PM_SLEEP
---
With Linus suddenly loving -Werror, let's get clean.
drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/rockchip/cdn-dp-core.c +2 -0
@@ -1123,6 +1123,7 @@ static int cdn_dp_suspend(struct device *dev)return ret; } +#ifdef CONFIG_PM_SLEEP static int cdn_dp_resume (struct device *dev) {struct cdn_dp_device *dp =dev_get_drvdata (dev);
@@ -1135,6 +1136,7 @@ static int cdn_dp_resume(struct device *dev) return 0; } +#endif static int cdn_dp_probe (struct platform_device *pdev) {
Signature · 1 line
2.33.0
Hi Adam,
Quoted 13 lines · On Sonntag, 12. September 2021 23:29:35 CEST Adam Borowski wrote:
Signed-off-by Adam Borowski <[email protected]>---
With Linus suddenly loving -Werror, let's get clean.drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++ 1 file changed, 2 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/rockchip/cdn-dp-core.cindex8ab3247dbc4a..bee0f2d2a9be100644
drivers/gpu/drm/rockchip/cdn-dp-core.c static int cdn_dp_suspend(struct device *dev) · line 1126
Quoted 4 lines
drivers/gpu/drm/rockchip/cdn-dp-core.c +1
-0@@ -1123,6 +1123,7 @@ static int cdn_dp_suspend(struct device *dev)return ret; } +#ifdef CONFIG_PM_SLEEP
I think we prefer the function attribute __maybe_unused here, because it also makes sure to get rid of the warning for any functions it references.
drivers/gpu/drm/rockchip/cdn-dp-core.c static int cdn_dp_resume(struct device *dev) · line 1142
Quoted 11 lines
drivers/gpu/drm/rockchip/cdn-dp-core.c +1
-0static int cdn_dp_resume (struct device *dev) {struct cdn_dp_device *dp =dev_get_drvdata (dev);@@ -1135,6 +1136,7 @@ static int cdn_dp_resume(struct device *dev) return 0; } +#endif static int cdn_dp_probe (struct platform_device *pdev) {
Regards,
Nicolas Frattaroli
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip