Re: [PATCH 6/6] regulator: core: simplify lock_two()
From: Doug Anderson
Date: Mon Aug 21 2023 - 12:51:51 EST
Hi,
On Sat, Aug 19, 2023 at 3:46 PM 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 | 28 ++++++++++------------------
> 1 file changed, 10 insertions(+), 18 deletions(-)
This is quite nearly a direct revert of commit 37473397b852
("regulator: core: Make regulator_lock_two() logic easier to follow"),
which was requested by Stephen in:
https://lore.kernel.org/r/CAE-0n53Eb1BeDPmjBycXUaQAF4ppiAM6UDWje_jiB9GAmR8MMw@xxxxxxxxxxxxxx
I don't personally have a strong opinion, but do prefer not to flip-flop. ;-)
-Doug