Re: [PATCH v2 7/7] regulator/core: regulator_lock_two: remove duplicate locking code

From: Doug Anderson
Date: Wed Aug 30 2023 - 16:51:47 EST


Hi,

On Wed, Aug 30, 2023 at 10:35 AM Michał Mirosław
<mirq-linux@xxxxxxxxxxxx> wrote:
>
> Make regulator_lock_two() shorter by observing that we have only two
> locks and when swapped earlier the retry code becomes identical to the
> normal (optimistic) path.
>
> Signed-off-by: Michał Mirosław <mirq-linux@xxxxxxxxxxxx>
> ---
> drivers/regulator/core.c | 30 +++++++++-------------------
> 1 file changed, 11 insertions(+), 19 deletions(-)

FWIW, I'm leaving this one to Stephen to review since he had strong
opinions on some of the style issues here.

-Doug