Skip to contentSkip to conversation

drm/tidss: Fix warning: unused variable 'tidss_pm_ops'

PATCH In review Cai Huoqing 2 participants 2 messages Nov 29, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/tidss: Fix warning: unused variable 'tidss_pm_ops'

Mark 'tidss_pm_ops' as __maybe_unused to avoid
the warning: unused variable 'tidss_pm_ops'

Fixes 6e120594631f ("drm/tidss: Make use of the helper macro SET_RUNTIME_PM_OPS()")
---
 drivers/gpu/drm/tidss/tidss_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tidss/tidss_drv.c +1 -1
index 4366b5c798e0..7c784e90e40e 100644
@@ -88,7 +88,7 @@ static int __maybe_unused tidss_resume(struct device *dev)
 	return drm_mode_config_helper_resume(&tidss->ddev);
 }
 
-static const struct dev_pm_ops tidss_pm_ops = {
+static __maybe_unused const struct dev_pm_ops tidss_pm_ops = {
 	SET_SYSTEM_SLEEP_PM_OPS(tidss_suspend, tidss_resume)
 	SET_RUNTIME_PM_OPS(tidss_pm_runtime_suspend, tidss_pm_runtime_resume, NULL)
 };
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 14 lines · Cai Huoqing

Mark 'tidss_pm_ops' as __maybe_unused to avoid
the warning: unused variable 'tidss_pm_ops'

Fixes 6e120594631f ("drm/tidss: Make use of the helper macro SET_RUNTIME_PM_OPS()")
---
  drivers/gpu/drm/tidss/tidss_drv.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tidss/tidss_drv.c +0 -0
index 4366b5c798e0..7c784e90e40e 100644

drivers/gpu/drm/tidss/tidss_drv.c static int __maybe_unused tidss_resume(struct device *dev) · line 94

Quoted 8 lines
drivers/gpu/drm/tidss/tidss_drv.c +1 -1
@@ -88,7 +88,7 @@ static int __maybe_unused tidss_resume(struct device *dev)
  	return drm_mode_config_helper_resume(&tidss->ddev);
  }
 
-static const struct dev_pm_ops tidss_pm_ops = {
+static __maybe_unused const struct dev_pm_ops tidss_pm_ops = {
  	SET_SYSTEM_SLEEP_PM_OPS(tidss_suspend, tidss_resume)
  	SET_RUNTIME_PM_OPS(tidss_pm_runtime_suspend, tidss_pm_runtime_resume, NULL)
  };

Thanks, I'll push to drm-misc-next.

Tomi