2020-05-11 11:08:56

by Zou Wei

[permalink] [raw]
Subject: [PATCH -next] power: supply: Make bd9995x_chip_reset static

Fix the following sparse warning:

drivers/power/supply/bd99954-charger.c:1028:6: warning: symbol 'bd9995x_chip_reset' was not declared.

The bd9995x_chip_reset() has only one call site within bd99954-charger.c
It should be static

Fixes: 0902f8366491 ("power: supply: Support ROHM bd99954 charger")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Samuel Zou <[email protected]>
---
drivers/power/supply/bd99954-charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/bd99954-charger.c b/drivers/power/supply/bd99954-charger.c
index 3da39c7..ffd8bfa 100644
--- a/drivers/power/supply/bd99954-charger.c
+++ b/drivers/power/supply/bd99954-charger.c
@@ -1025,7 +1025,7 @@ static int bd9995x_fw_probe(struct bd9995x_device *bd)
return 0;
}

-void bd9995x_chip_reset(void *bd)
+static void bd9995x_chip_reset(void *bd)
{
__bd9995x_chip_reset(bd);
}
--
2.6.2


2020-05-11 11:25:02

by Matti Vaittinen

[permalink] [raw]
Subject: Re: [PATCH -next] power: supply: Make bd9995x_chip_reset static


On Mon, 2020-05-11 at 19:12 +0800, Samuel Zou wrote:
> Fix the following sparse warning:
>
> drivers/power/supply/bd99954-charger.c:1028:6: warning: symbol
> 'bd9995x_chip_reset' was not declared.
>
> The bd9995x_chip_reset() has only one call site within bd99954-
> charger.c
> It should be static
>
> Fixes: 0902f8366491 ("power: supply: Support ROHM bd99954 charger")
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Samuel Zou <[email protected]>

Reviewed-by: Matti Vaittinen <[email protected]>

> ---
> drivers/power/supply/bd99954-charger.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/bd99954-charger.c
> b/drivers/power/supply/bd99954-charger.c
> index 3da39c7..ffd8bfa 100644
> --- a/drivers/power/supply/bd99954-charger.c
> +++ b/drivers/power/supply/bd99954-charger.c
> @@ -1025,7 +1025,7 @@ static int bd9995x_fw_probe(struct
> bd9995x_device *bd)
> return 0;
> }
>
> -void bd9995x_chip_reset(void *bd)
> +static void bd9995x_chip_reset(void *bd)
> {
> __bd9995x_chip_reset(bd);
> }

2020-05-28 17:10:49

by Sebastian Reichel

[permalink] [raw]
Subject: Re: [PATCH -next] power: supply: Make bd9995x_chip_reset static

Hi,

On Mon, May 11, 2020 at 11:22:26AM +0000, Vaittinen, Matti wrote:
> On Mon, 2020-05-11 at 19:12 +0800, Samuel Zou wrote:
> > Fix the following sparse warning:
> >
> > drivers/power/supply/bd99954-charger.c:1028:6: warning: symbol
> > 'bd9995x_chip_reset' was not declared.
> >
> > The bd9995x_chip_reset() has only one call site within bd99954-
> > charger.c
> > It should be static
> >
> > Fixes: 0902f8366491 ("power: supply: Support ROHM bd99954 charger")
> > Reported-by: Hulk Robot <[email protected]>
> > Signed-off-by: Samuel Zou <[email protected]>
>
> Reviewed-by: Matti Vaittinen <[email protected]>

Thanks, queued.

-- Sebastian

> > ---
> > drivers/power/supply/bd99954-charger.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/power/supply/bd99954-charger.c
> > b/drivers/power/supply/bd99954-charger.c
> > index 3da39c7..ffd8bfa 100644
> > --- a/drivers/power/supply/bd99954-charger.c
> > +++ b/drivers/power/supply/bd99954-charger.c
> > @@ -1025,7 +1025,7 @@ static int bd9995x_fw_probe(struct
> > bd9995x_device *bd)
> > return 0;
> > }
> >
> > -void bd9995x_chip_reset(void *bd)
> > +static void bd9995x_chip_reset(void *bd)
> > {
> > __bd9995x_chip_reset(bd);
> > }
>


Attachments:
(No filename) (1.28 kB)
signature.asc (849.00 B)
Download all attachments