[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c226e1e-f707-c005-8c46-c0445f60a9a8@gmail.com>
Date: Tue, 20 Nov 2018 03:58:55 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Douglas Anderson <dianders@...omium.org>,
Mark Brown <broonie@...nel.org>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>, evgreen@...omium.org,
swboyd@...omium.org, ryandcase@...omium.org,
David Collins <collinsd@...eaurora.org>,
linux-arm-msm@...r.kernel.org, Liam Girdwood <lgirdwood@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in
regulator_force_disable()
On 20.11.2018 3:26, Douglas Anderson wrote:
> In regulator_force_disable() there was a strange loop that looked like:
>
> while (rdev->open_count--)
> regulator_disable(rdev->supply);
>
> I'm not totally sure what the goal was for this loop, but it seems
> wrong to me. If anything I think maybe we should have been looping
> over our use_count, but even that might be a little strange. For now
> let's just remove the code and we can add something back in if someone
> can explain what's expected.
>
> Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking")
Seems this "fixes" tag is incorrect, isn't it? The "ww_mutex" patch didn't touch this code.
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
> ---
>
> drivers/regulator/core.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 2eda87520832..963081aba17a 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -2738,10 +2738,6 @@ int regulator_force_disable(struct regulator *regulator)
>
> regulator_unlock_dependent(rdev, &ww_ctx);
>
> - if (rdev->supply)
> - while (rdev->open_count--)
> - regulator_disable(rdev->supply);
> -
> return ret;
> }
> EXPORT_SYMBOL_GPL(regulator_force_disable);
>
Powered by blists - more mailing lists