From: chenlifu <chenlifu@huawei.com>
To: Tom Rix <trix@redhat.com>, <linus.walleij@linaro.org>, <sre@kernel.org>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] power: supply: ab8500: remove unused static local variable
Date: Wed, 17 Aug 2022 10:31:29 +0800 [thread overview]
Message-ID: <a0822c1f-6652-a4ef-b482-f54944deb094@huawei.com> (raw)
In-Reply-To: <7b42a25a-806f-f3b2-b42f-ac3fdb6627b4@huawei.com>
在 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;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next prev parent reply other threads:[~2022-08-17 2:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 2:27 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 [this message]
2022-09-11 12:34 ` Sebastian Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a0822c1f-6652-a4ef-b482-f54944deb094@huawei.com \
--to=chenlifu@huawei.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®