[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b42a25a-806f-f3b2-b42f-ac3fdb6627b4@huawei.com>
Date: Wed, 17 Aug 2022 09:57:44 +0800
From: chenlifu <chenlifu@...wei.com>
To: Tom Rix <trix@...hat.com>, <linus.walleij@...aro.org>,
<sre@...nel.org>
CC: <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] power: supply: ab8500: remove unused static local
variable
在 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@...hat.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@...wei.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;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Powered by blists - more mailing lists