Skip to contentSkip to conversation

drm/rockchip: cdn-dp-core: Fix cdn_dp_resume unused warning

PATCH Superseded Palmer Dabbelt 2 participants 2 messages Jan 15, 2021 – Sep 14, 2021

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/rockchip: cdn-dp-core: Fix cdn_dp_resume unused warning

From: Palmer Dabbelt <[email protected]>

cdn_dp_resume is only used under PM_SLEEP, and now that it's static an unused function warning is triggered undner !PM_SLEEP. This conditionally enables the function to avoid the warning.

Fixes 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static")
---
 drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/rockchip/cdn-dp-core.c +2 -0
index a4a45daf93f2..063a60d213ba 100644
@@ -1121,6 +1121,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);
@@ -1133,6 +1134,7 @@ static int cdn_dp_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static int cdn_dp_probe(struct platform_device *pdev)
 {
Signature · 7 lines
2.20.1


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Acked-by on v1 1/1
#1 lore raw
Quoted 26 lines · Palmer Dabbelt

From: Palmer Dabbelt <[email protected]>

cdn_dp_resume is only used under PM_SLEEP, and now that it's static an unused function warning is triggered undner !PM_SLEEP. This conditionally enables the function to avoid the warning.

Fixes 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static")
---
  drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/rockchip/cdn-dp-core.c +1 -0
index a4a45daf93f2..063a60d213ba 100644
@@ -1121,6 +1121,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);

drivers/gpu/drm/rockchip/cdn-dp-core.c static int cdn_dp_resume(struct device *dev) · line 1140

Quoted 7 lines
drivers/gpu/drm/rockchip/cdn-dp-core.c +1 -0
@@ -1133,6 +1134,7 @@ static int cdn_dp_resume(struct device *dev)
 
  	return 0;
  }
+#endif
 
  static int cdn_dp_probe(struct platform_device *pdev)
  {

Is someone going to merge this patch from January?

thanks.

Signature · 1 line
~Randy