[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=XEDCCOV9S_Vf45nee7-xqJLXmQqTp8FAM9v0jQ9X5e-g@mail.gmail.com>
Date: Mon, 21 Aug 2023 09:50:06 -0700
From: Doug Anderson <dianders@...omium.org>
To: Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
Dmitry Osipenko <digetx@...il.com>
Subject: Re: [PATCH 1/6] regulator: core: simplify regulator_lock_nested()
Hi,
On Sat, Aug 19, 2023 at 3:46 PM Michał Mirosław <mirq-linux@...e.qmqm.pl> wrote:
>
> `lock` is only false when the `rdev` is already locked and the owner is
> `current`. In this case `ret` is always zero. By removing `lock`, we
> thus remove `mutex_owner` write avoidance, but make the code flow more
> understandable.
>
> Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
> ---
> drivers/regulator/core.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
Agreed that this looks to be equivalent and easier to understand.
Reviewed-by: Douglas Anderson <dianders@...omium.org>
Powered by blists - more mailing lists