* [PATCH -next] power: supply: Make some symbols static
@ 2021-04-10 4:12 Qiheng Lin
2021-04-10 10:41 ` Maximilian Luz
0 siblings, 1 reply; 3+ messages in thread
From: Qiheng Lin @ 2021-04-10 4:12 UTC (permalink / raw)
To: linqiheng, Maximilian Luz, Sebastian Reichel
Cc: linux-pm, platform-driver-x86, kernel-janitors, Hulk Robot
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.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
---
drivers/power/supply/surface_battery.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/power/supply/surface_battery.c b/drivers/power/supply/surface_battery.c
index 4116dd839ecd..7efa431a62b2 100644
--- a/drivers/power/supply/surface_battery.c
+++ b/drivers/power/supply/surface_battery.c
@@ -697,7 +697,7 @@ static ssize_t alarm_store(struct device *dev, struct device_attribute *attr, co
return 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)
{
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] power: supply: Make some symbols static
2021-04-10 4:12 [PATCH -next] power: supply: Make some symbols static Qiheng Lin
@ 2021-04-10 10:41 ` Maximilian Luz
2021-04-12 19:59 ` Sebastian Reichel
0 siblings, 1 reply; 3+ messages in thread
From: Maximilian Luz @ 2021-04-10 10:41 UTC (permalink / raw)
To: Qiheng Lin, Sebastian Reichel
Cc: linux-pm, platform-driver-x86, kernel-janitors, Hulk Robot
On 4/10/21 6:12 AM, Qiheng Lin wrote:
> 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.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
Acked-by: Maximilian Luz <luzmaximilian@gmail.com>
> ---
> drivers/power/supply/surface_battery.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/power/supply/surface_battery.c b/drivers/power/supply/surface_battery.c
> index 4116dd839ecd..7efa431a62b2 100644
> --- a/drivers/power/supply/surface_battery.c
> +++ b/drivers/power/supply/surface_battery.c
> @@ -697,7 +697,7 @@ static ssize_t alarm_store(struct device *dev, struct device_attribute *attr, co
> return 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)
> {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] power: supply: Make some symbols static
2021-04-10 10:41 ` Maximilian Luz
@ 2021-04-12 19:59 ` Sebastian Reichel
0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2021-04-12 19:59 UTC (permalink / raw)
To: Maximilian Luz
Cc: Qiheng Lin, linux-pm, platform-driver-x86, kernel-janitors, Hulk Robot
[-- Attachment #1: Type: text/plain, Size: 1815 bytes --]
Hi,
On Sat, Apr 10, 2021 at 12:41:10PM +0200, Maximilian Luz wrote:
> On 4/10/21 6:12 AM, Qiheng Lin wrote:
> > 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.
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
>
> Acked-by: Maximilian Luz <luzmaximilian@gmail.com>
Thanks, queued.
-- Sebastian
> > ---
> > drivers/power/supply/surface_battery.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/power/supply/surface_battery.c b/drivers/power/supply/surface_battery.c
> > index 4116dd839ecd..7efa431a62b2 100644
> > --- a/drivers/power/supply/surface_battery.c
> > +++ b/drivers/power/supply/surface_battery.c
> > @@ -697,7 +697,7 @@ static ssize_t alarm_store(struct device *dev, struct device_attribute *attr, co
> > return 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)
> > {
> >
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-12 20:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-10 4:12 [PATCH -next] power: supply: Make some symbols static Qiheng Lin
2021-04-10 10:41 ` Maximilian Luz
2021-04-12 19:59 ` Sebastian Reichel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.