[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d5dad5246f442e5aa96bdc50ac4b1f1@bfs.de>
Date: Fri, 18 Jun 2021 11:19:22 +0000
From: Walter Harms <wharms@....de>
To: Colin King <colin.king@...onical.com>,
Sebastian Reichel <sre@...nel.org>,
Hans de Goede <hdegoede@...hat.com>,
Chen-Yu Tsai <wens@...e.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: AW: [PATCH] power: supply: axp288_fuel_gauge: remove redundant
continue statement
Just a remark:
the function fuel_gauge_reg_readb() is reporting via dev_err().
But some callers are reporting also. Maybe someone should take
a look.
The valid return seems >=0 so removing the dev_err seems an option.
jm2c,
re,
wh
________________________________________
Von: Colin King <colin.king@...onical.com>
Gesendet: Freitag, 18. Juni 2021 11:29:24
An: Sebastian Reichel; Hans de Goede; Chen-Yu Tsai; linux-pm@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org
Betreff: [PATCH] power: supply: axp288_fuel_gauge: remove redundant continue statement
WARNUNG: Diese E-Mail kam von außerhalb der Organisation. Klicken Sie nicht auf Links oder öffnen Sie keine Anhänge, es sei denn, Sie kennen den/die Absender*in und wissen, dass der Inhalt sicher ist.
From: Colin Ian King <colin.king@...onical.com>
The continue statement at the end of a for-loop has no effect,
invert the if expression and remove the continue.
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
drivers/power/supply/axp288_fuel_gauge.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
index 39e16ecb7638..20e63609ab47 100644
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -142,9 +142,7 @@ static int fuel_gauge_reg_readb(struct axp288_fg_info *info, int reg)
for (i = 0; i < NR_RETRY_CNT; i++) {
ret = regmap_read(info->regmap, reg, &val);
- if (ret == -EBUSY)
- continue;
- else
+ if (ret != -EBUSY)
break;
}
--
2.31.1
Powered by blists - more mailing lists