* [PATCH] power: supply: ab8500: remove unused static local variable
@ 2022-07-19 2:27 Tom Rix
2022-07-19 7:57 ` Linus Walleij
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Tom Rix @ 2022-07-19 2:27 UTC (permalink / raw)
To: linus.walleij, sre; +Cc: linux-pm, linux-kernel, Tom Rix
cpp_check reports
[drivers/power/supply/ab8500_chargalg.c:493]: (style) Variable 'ab8500_chargalg_ex_ac_enable_toggle' is assigned a value that is never used.
From inspection, this variable is never used. So remove it.
Fixes: 6c50a08d9dd3 ("power: supply: ab8500: Drop external charger leftovers")
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/power/supply/ab8500_chargalg.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c
index ae4be553f424..05146d436a6a 100644
--- a/drivers/power/supply/ab8500_chargalg.c
+++ b/drivers/power/supply/ab8500_chargalg.c
@@ -490,8 +490,6 @@ static int ab8500_chargalg_kick_watchdog(struct ab8500_chargalg *di)
static int ab8500_chargalg_ac_en(struct ab8500_chargalg *di, int enable,
int vset_uv, int iset_ua)
{
- static int ab8500_chargalg_ex_ac_enable_toggle;
-
if (!di->ac_chg || !di->ac_chg->ops.enable)
return -ENXIO;
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] power: supply: ab8500: remove unused static local variable
2022-07-19 2:27 [PATCH] power: supply: ab8500: remove unused static local variable Tom Rix
@ 2022-07-19 7:57 ` Linus Walleij
2022-08-12 7:53 ` Miles Chen
2022-08-17 1:57 ` chenlifu
2022-09-11 12:34 ` Sebastian Reichel
2 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2022-07-19 7:57 UTC (permalink / raw)
To: Tom Rix; +Cc: sre, linux-pm, linux-kernel
On Tue, Jul 19, 2022 at 4:27 AM Tom Rix <trix@redhat.com> wrote:
> cpp_check reports
> [drivers/power/supply/ab8500_chargalg.c:493]: (style) Variable 'ab8500_chargalg_ex_ac_enable_toggle' is assigned a value that is never used.
>
> From inspection, this variable is never used. So remove it.
>
> Fixes: 6c50a08d9dd3 ("power: supply: ab8500: Drop external charger leftovers")
> Signed-off-by: Tom Rix <trix@redhat.com>
Thanks Tom!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: supply: ab8500: remove unused static local variable
2022-07-19 7:57 ` Linus Walleij
@ 2022-08-12 7:53 ` Miles Chen
0 siblings, 0 replies; 6+ messages in thread
From: Miles Chen @ 2022-08-12 7:53 UTC (permalink / raw)
To: linus.walleij; +Cc: linux-kernel, linux-pm, sre, trix
>> cpp_check reports
>> [drivers/power/supply/ab8500_chargalg.c:493]: (style) Variable 'ab8500_chargalg_ex_ac_enable_toggle' is assigned a value that is never used.
>>
>> From inspection, this variable is never used. So remove it.
>>
>> Fixes: 6c50a08d9dd3 ("power: supply: ab8500: Drop external charger leftovers")
>> Signed-off-by: Tom Rix <trix@redhat.com>
>
>Thanks Tom!
>Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
>Yours,
>Linus Walleij
Hi Sebastian,
It looks like that this patch is not in linux-next 20220812
and I can still observe this build error with ARCH=arm, defconfig=allyesconfig.
Would you pick up this fix, please?
Thanks,
Miles
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: supply: ab8500: remove unused static local variable
2022-07-19 2:27 [PATCH] power: supply: ab8500: remove unused static local variable Tom Rix
2022-07-19 7:57 ` Linus Walleij
@ 2022-08-17 1:57 ` chenlifu
2022-08-17 2:31 ` chenlifu
2022-09-11 12:34 ` Sebastian Reichel
2 siblings, 1 reply; 6+ messages in thread
From: chenlifu @ 2022-08-17 1:57 UTC (permalink / raw)
To: Tom Rix, linus.walleij, sre; +Cc: linux-pm, linux-kernel
在 2022/7/19 10:27, Tom Rix 写道:
> cpp_check reports
> [drivers/power/supply/ab8500_chargalg.c:493]: (style) Variable 'ab8500_chargalg_ex_ac_enable_toggle' is assigned a value that is never used.
>
>>From inspection, this variable is never used. So remove it.
>
> Fixes: 6c50a08d9dd3 ("power: supply: ab8500: Drop external charger leftovers")
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> drivers/power/supply/ab8500_chargalg.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c
> index ae4be553f424..05146d436a6a 100644
> --- a/drivers/power/supply/ab8500_chargalg.c
> +++ b/drivers/power/supply/ab8500_chargalg.c
> @@ -490,8 +490,6 @@ static int ab8500_chargalg_kick_watchdog(struct ab8500_chargalg *di)
> static int ab8500_chargalg_ac_en(struct ab8500_chargalg *di, int enable,
> int vset_uv, int iset_ua)
> {
> - static int ab8500_chargalg_ex_ac_enable_toggle;
> -
> if (!di->ac_chg || !di->ac_chg->ops.enable)
> return -ENXIO;
>
>
Reviewed-by: Chen Lifu <chenlifu@huawei.com>
I can still observe this build error with ARCH=arm,
defconfig=allyesconfig in linux-next next-200816:
drivers/power/supply/ab8500_chargalg.c: In function ‘ab8500_chargalg_ac_en’:
drivers/power/supply/ab8500_chargalg.c:493:13: error: unused variable
‘ab8500_chargalg_ex_ac_enable_toggle’ [-Werror=unused-variable]
static int ab8500_chargalg_ex_ac_enable_toggle;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: supply: ab8500: remove unused static local variable
2022-08-17 1:57 ` chenlifu
@ 2022-08-17 2:31 ` chenlifu
0 siblings, 0 replies; 6+ messages in thread
From: chenlifu @ 2022-08-17 2:31 UTC (permalink / raw)
To: Tom Rix, linus.walleij, sre; +Cc: linux-pm, linux-kernel
在 2022/8/17 9:57, chenlifu 写道:
> 在 2022/7/19 10:27, Tom Rix 写道:
>> cpp_check reports
>> [drivers/power/supply/ab8500_chargalg.c:493]: (style) Variable
>> 'ab8500_chargalg_ex_ac_enable_toggle' is assigned a value that is
>> never used.
>>
>>> From inspection, this variable is never used. So remove it.
>>
>> Fixes: 6c50a08d9dd3 ("power: supply: ab8500: Drop external charger
>> leftovers")
>> Signed-off-by: Tom Rix <trix@redhat.com>
>> ---
>> drivers/power/supply/ab8500_chargalg.c | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/power/supply/ab8500_chargalg.c
>> b/drivers/power/supply/ab8500_chargalg.c
>> index ae4be553f424..05146d436a6a 100644
>> --- a/drivers/power/supply/ab8500_chargalg.c
>> +++ b/drivers/power/supply/ab8500_chargalg.c
>> @@ -490,8 +490,6 @@ static int ab8500_chargalg_kick_watchdog(struct
>> ab8500_chargalg *di)
>> static int ab8500_chargalg_ac_en(struct ab8500_chargalg *di, int
>> enable,
>> int vset_uv, int iset_ua)
>> {
>> - static int ab8500_chargalg_ex_ac_enable_toggle;
>> -
>> if (!di->ac_chg || !di->ac_chg->ops.enable)
>> return -ENXIO;
>>
>
> Reviewed-by: Chen Lifu <chenlifu@huawei.com>
>
>
> I can still observe this build error with ARCH=arm,
> defconfig=allyesconfig in linux-next next-200816:
>
> drivers/power/supply/ab8500_chargalg.c: In function
> ‘ab8500_chargalg_ac_en’:
> drivers/power/supply/ab8500_chargalg.c:493:13: error: unused variable
> ‘ab8500_chargalg_ex_ac_enable_toggle’ [-Werror=unused-variable]
> static int ab8500_chargalg_ex_ac_enable_toggle;
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> .
Reviewed-by: Chen Lifu <chenlifu@huawei.com>
fixed the tag: next-200816 --> next-20220816
I can still observe this build error with ARCH=arm,
defconfig=allyesconfig in linux-next next-20220816:
drivers/power/supply/ab8500_chargalg.c: In function ‘ab8500_chargalg_ac_en’:
drivers/power/supply/ab8500_chargalg.c:493:13: error: unused variable
‘ab8500_chargalg_ex_ac_enable_toggle’ [-Werror=unused-variable]
static int ab8500_chargalg_ex_ac_enable_toggle;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: supply: ab8500: remove unused static local variable
2022-07-19 2:27 [PATCH] power: supply: ab8500: remove unused static local variable Tom Rix
2022-07-19 7:57 ` Linus Walleij
2022-08-17 1:57 ` chenlifu
@ 2022-09-11 12:34 ` Sebastian Reichel
2 siblings, 0 replies; 6+ messages in thread
From: Sebastian Reichel @ 2022-09-11 12:34 UTC (permalink / raw)
To: Tom Rix; +Cc: linus.walleij, linux-pm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]
Hi,
On Mon, Jul 18, 2022 at 10:27:43PM -0400, Tom Rix wrote:
> cpp_check reports
> [drivers/power/supply/ab8500_chargalg.c:493]: (style) Variable 'ab8500_chargalg_ex_ac_enable_toggle' is assigned a value that is never used.
>
> From inspection, this variable is never used. So remove it.
>
> Fixes: 6c50a08d9dd3 ("power: supply: ab8500: Drop external charger leftovers")
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
Thanks, queued into power-supply's fixes branch.
Sorry for the delay.
-- Sebastian
> drivers/power/supply/ab8500_chargalg.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c
> index ae4be553f424..05146d436a6a 100644
> --- a/drivers/power/supply/ab8500_chargalg.c
> +++ b/drivers/power/supply/ab8500_chargalg.c
> @@ -490,8 +490,6 @@ static int ab8500_chargalg_kick_watchdog(struct ab8500_chargalg *di)
> static int ab8500_chargalg_ac_en(struct ab8500_chargalg *di, int enable,
> int vset_uv, int iset_ua)
> {
> - static int ab8500_chargalg_ex_ac_enable_toggle;
> -
> if (!di->ac_chg || !di->ac_chg->ops.enable)
> return -ENXIO;
>
> --
> 2.27.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-09-12 10:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 2:27 [PATCH] power: supply: ab8500: remove unused static local variable Tom Rix
2022-07-19 7:57 ` Linus Walleij
2022-08-12 7:53 ` Miles Chen
2022-08-17 1:57 ` chenlifu
2022-08-17 2:31 ` chenlifu
2022-09-11 12:34 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).