2020-04-26 09:48:17

by Jason Yan

[permalink] [raw]
Subject: [PATCH] power: supply: ab8500_fg: remove comparison to bool

Fix the following coccicheck warning:

drivers/power/supply/ab8500_fg.c:2402:5-24: WARNING: Comparison to bool

Signed-off-by: Jason Yan <[email protected]>
---
drivers/power/supply/ab8500_fg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index b96f90a82ecf..751c4f6c7487 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -2399,7 +2399,7 @@ static void ab8500_fg_reinit_work(struct work_struct *work)
struct ab8500_fg *di = container_of(work, struct ab8500_fg,
fg_reinit_work.work);

- if (di->flags.calibrate == false) {
+ if (!di->flags.calibrate) {
dev_dbg(di->dev, "Resetting FG state machine to init.\n");
ab8500_fg_clear_cap_samples(di);
ab8500_fg_calc_cap_discharge_voltage(di, true);
--
2.21.1


2020-04-28 14:06:38

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] power: supply: ab8500_fg: remove comparison to bool

On Sun, Apr 26, 2020 at 11:43 AM Jason Yan <[email protected]> wrote:

> Fix the following coccicheck warning:
>
> drivers/power/supply/ab8500_fg.c:2402:5-24: WARNING: Comparison to bool
>
> Signed-off-by: Jason Yan <[email protected]>

Reviewed-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

2020-04-28 19:24:34

by Sebastian Reichel

[permalink] [raw]
Subject: Re: [PATCH] power: supply: ab8500_fg: remove comparison to bool

Hi,

On Tue, Apr 28, 2020 at 04:02:31PM +0200, Linus Walleij wrote:
> On Sun, Apr 26, 2020 at 11:43 AM Jason Yan <[email protected]> wrote:
>
> > Fix the following coccicheck warning:
> >
> > drivers/power/supply/ab8500_fg.c:2402:5-24: WARNING: Comparison to bool
> >
> > Signed-off-by: Jason Yan <[email protected]>
>
> Reviewed-by: Linus Walleij <[email protected]>

Thanks, queued.

-- Sebastian


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