diff mbox series

[-next] power: supply: Make symbol 'surface_ac_pm_ops' static

Message ID 20210410041249.12846-1-linqiheng@huawei.com (mailing list archive)
State Deferred, archived
Headers show
Series [-next] power: supply: Make symbol 'surface_ac_pm_ops' static | expand

Commit Message

Qiheng Lin April 10, 2021, 4:12 a.m. UTC
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.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
---
 drivers/power/supply/surface_charger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maximilian Luz April 10, 2021, 10:42 a.m. UTC | #1
On 4/10/21 6:12 AM, Qiheng Lin wrote:
> 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.
> 
> 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_charger.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/surface_charger.c b/drivers/power/supply/surface_charger.c
> index c2dd7e604d14..81a5b79822c9 100644
> --- a/drivers/power/supply/surface_charger.c
> +++ b/drivers/power/supply/surface_charger.c
> @@ -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)
>   {
>
Sebastian Reichel April 12, 2021, 8 p.m. UTC | #2
Hi,

On Sat, Apr 10, 2021 at 12:42:43PM +0200, Maximilian Luz wrote:
> On 4/10/21 6:12 AM, Qiheng Lin wrote:
> > 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.
> > 
> > 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_charger.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/power/supply/surface_charger.c b/drivers/power/supply/surface_charger.c
> > index c2dd7e604d14..81a5b79822c9 100644
> > --- a/drivers/power/supply/surface_charger.c
> > +++ b/drivers/power/supply/surface_charger.c
> > @@ -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)
> >   {
> >
diff mbox series

Patch

diff --git a/drivers/power/supply/surface_charger.c b/drivers/power/supply/surface_charger.c
index c2dd7e604d14..81a5b79822c9 100644
--- a/drivers/power/supply/surface_charger.c
+++ b/drivers/power/supply/surface_charger.c
@@ -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)
 {