power: supply: Make some symbols static
Subsystems (4)
PATCH 1/1 power: supply: Make some symbols static
The sparse tool complains as follows:
drivers/power/supply/surface_battery.c:700:1: warning:
symbol 'dev_attr_alarm' was not declared. Should it be static?drivers/power/supply/surface_battery.c:805:1: warning:
symbol 'surface_battery_pm_ops' was not declared. Should it be static?
This symbol is not used outside of surface_battery.c, so this commit marks it static.
--- drivers/power/supply/surface_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/power/supply/surface_battery.c +2 -2
@@ -697,7 +697,7 @@ static ssize_t alarm_store(struct device *dev, struct device_attribute *attr, coreturn count; } -DEVICE_ATTR_RW (alarm); +static DEVICE_ATTR_RW (alarm);static struct attribute *spwr_battery_attrs[] = { &dev_attr_alarm.attr,
@@ -802,7 +802,7 @@ static int __maybe_unused surface_battery_resume(struct device *dev) {return spwr_battery_recheck_full (dev_get_drvdata (dev)); } -SIMPLE_DEV_PM_OPS (surface_battery_pm_ops,NULL , surface_battery_resume); +static SIMPLE_DEV_PM_OPS(surface_battery_pm_ops, NULL, surface_battery_resume);static int surface_battery_probe (struct ssam_device *sdev) {
Quoted 7 lines · Qiheng Lin
The sparse tool complains as follows:
drivers/power/supply/surface_battery.c:700:1: warning:
symbol 'dev_attr_alarm' was not declared. Should it be static?drivers/power/supply/surface_battery.c:805:1: warning:
symbol 'surface_battery_pm_ops' was not declared. Should it be static?
Quoted 5 lines
This symbol is not used outside of
surface_battery.c, so this commit marks it static.Reported-by Hulk Robot <[email protected]>Signed-off-by Qiheng Lin <[email protected]>
Quoted 27 lines
--- drivers/power/supply/surface_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/power/supply/surface_battery.c +2
-2@@ -697,7 +697,7 @@ static ssize_t alarm_store(struct device *dev, struct device_attribute *attr, coreturn count; } -DEVICE_ATTR_RW (alarm); +static DEVICE_ATTR_RW (alarm);static struct attribute *spwr_battery_attrs[] = { &dev_attr_alarm.attr,@@ -802,7 +802,7 @@ static int __maybe_unused surface_battery_resume(struct device *dev) {return spwr_battery_recheck_full (dev_get_drvdata (dev)); } -SIMPLE_DEV_PM_OPS (surface_battery_pm_ops,NULL , surface_battery_resume); +static SIMPLE_DEV_PM_OPS(surface_battery_pm_ops, NULL, surface_battery_resume);static int surface_battery_probe (struct ssam_device *sdev) {
Hi,
Quoted 8 lines · Maximilian Luz
Quoted 7 lines · Qiheng Lin
The sparse tool complains as follows:
drivers/power/supply/surface_battery.c:700:1: warning:
symbol 'dev_attr_alarm' was not declared. Should it be static?drivers/power/supply/surface_battery.c:805:1: warning:
symbol 'surface_battery_pm_ops' was not declared. Should it be static?
Quoted 7 lines
Quoted 5 lines
This symbol is not used outside of
surface_battery.c, so this commit marks it static.Reported-by Hulk Robot <[email protected]>Signed-off-by Qiheng Lin <[email protected]>Acked-by Maximilian Luz <[email protected]>
Thanks, queued.
-- Sebastian
Quoted 24 lines
Quoted 24 lines
--- drivers/power/supply/surface_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/power/supply/surface_battery.c +2
-2@@ -697,7 +697,7 @@ static ssize_t alarm_store(struct device *dev, struct device_attribute *attr, coreturn count; } -DEVICE_ATTR_RW (alarm); +static DEVICE_ATTR_RW (alarm);static struct attribute *spwr_battery_attrs[] = { &dev_attr_alarm.attr,@@ -802,7 +802,7 @@ static int __maybe_unused surface_battery_resume(struct device *dev) {return spwr_battery_recheck_full (dev_get_drvdata (dev)); } -SIMPLE_DEV_PM_OPS (surface_battery_pm_ops,NULL , surface_battery_resume); +static SIMPLE_DEV_PM_OPS(surface_battery_pm_ops, NULL, surface_battery_resume);static int surface_battery_probe (struct ssam_device *sdev) {