[PATCH] ASoC: meson: axg-tdm-formatter: Use guard() for mutex locks
Jerome Brunet
jbrunet at baylibre.com
Thu Jun 11 01:10:35 PDT 2026
On mer. 10 juin 2026 at 23:27, Bui Duc Phuc <phucduc.bui at gmail.com> wrote:
> Hi Jerome,
>
> Thank you for your feedback,
>
>>
>> I suppose it is OK but it does not seem to really clean anything and
>> make the code easier to follow in that instance, from my perspective at
>> least.
>>
>> If there is policy to systematically use guard() whenever
>> possible then OK, otherwise it seems unnecessary.
>>
>
> I have noticed that guard() has been adopted in several subsystems.
> Since this appears to be the only place in the Meson ASoC code currently using
> mutex_lock()/mutex_unlock(), I converted it for consistency with the
> newer style.
>
> Going forward, should new Meson ASoC code use guard(), or should it continue
> using the traditional mutex_lock()/mutex_unlock() pattern?
Can't say if there is such policy either. IMO it should be more a
case-by-case thing
The code is not better or worse with the change but you went through the
trouble of doing so, if Mark is fine with it, let's have it
Reviewed-by: Jerome Brunet <jbrunet at baylibre.com>
>
> Best regards,
> Phuc
--
Jerome
More information about the linux-arm-kernel
mailing list