lkml.org 
[lkml]   [2021]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] power: supply: axp288_fuel_gauge: remove redundant continue statement
From
Date
Hi,

On 6/18/21 11:29 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.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@canonical.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;
> }

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans

\
 
 \ /
  Last update: 2021-06-18 15:36    [W:0.046 / U:1.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site