Skip to contentSkip to conversation

power: supply: Make symbol 'surface_ac_pm_ops' static

PATCH In review Qiheng Lin 3 participants 3 messages Apr 10, 2021 – Apr 12, 2021

Subsystems (4)
lore
Share & tools
lore

Qiheng Lin

author
#0 lore raw

PATCH 1/1 power: supply: Make symbol 'surface_ac_pm_ops' static

The sparse tool complains as follows:

drivers/power/supply/surface_charger.c:229:1: warning:
symbol 'surface_ac_pm_ops' was not declared. Should it be static?

This symbol is not used outside of surface_charger.c, so this commit marks it static.

---
 drivers/power/supply/surface_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/surface_charger.c +1 -1
index c2dd7e604d14..81a5b79822c9 100644
@@ -226,7 +226,7 @@ static int __maybe_unused surface_ac_resume(struct device *dev)
 {
 	return spwr_ac_recheck(dev_get_drvdata(dev));
 }
-SIMPLE_DEV_PM_OPS(surface_ac_pm_ops, NULL, surface_ac_resume);
+static SIMPLE_DEV_PM_OPS(surface_ac_pm_ops, NULL, surface_ac_resume);
 
 static int surface_ac_probe(struct ssam_device *sdev)
 {
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Qiheng Lin

The sparse tool complains as follows:

drivers/power/supply/surface_charger.c:229:1: warning:
symbol 'surface_ac_pm_ops' was not declared. Should it be static?

This symbol is not used outside of surface_charger.c, so this commit marks it static.

Quoted 18 lines
---
  drivers/power/supply/surface_charger.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/surface_charger.c +1 -1
index c2dd7e604d14..81a5b79822c9 100644
@@ -226,7 +226,7 @@ static int __maybe_unused surface_ac_resume(struct device *dev)
  {
  	return spwr_ac_recheck(dev_get_drvdata(dev));
  }
-SIMPLE_DEV_PM_OPS(surface_ac_pm_ops, NULL, surface_ac_resume);
+static SIMPLE_DEV_PM_OPS(surface_ac_pm_ops, NULL, surface_ac_resume);
 
  static int surface_ac_probe(struct ssam_device *sdev)
  {
#2 lore raw

Hi,

Quoted 6 lines · Maximilian Luz
Quoted 5 lines · Qiheng Lin

The sparse tool complains as follows:

drivers/power/supply/surface_charger.c:229:1: warning:
symbol 'surface_ac_pm_ops' was not declared. Should it be static?

Quoted 7 lines
Quoted 5 lines

This symbol is not used outside of surface_charger.c, so this commit marks it static.

Thanks, queued.

-- Sebastian

Quoted 17 lines
Quoted 17 lines
---
  drivers/power/supply/surface_charger.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/surface_charger.c +1 -1
index c2dd7e604d14..81a5b79822c9 100644
@@ -226,7 +226,7 @@ static int __maybe_unused surface_ac_resume(struct device *dev)
  {
  	return spwr_ac_recheck(dev_get_drvdata(dev));
  }
-SIMPLE_DEV_PM_OPS(surface_ac_pm_ops, NULL, surface_ac_resume);
+static SIMPLE_DEV_PM_OPS(surface_ac_pm_ops, NULL, surface_ac_resume);
  static int surface_ac_probe(struct ssam_device *sdev)
  {