Re: [PATCH v2 1/4] iio: magnetometer: rm3100: Use guard(mutex)() in rm3100_read_mag()

From: Andy Shevchenko

Date: Tue Apr 28 2026 - 09:59:47 EST


On Tue, Apr 28, 2026 at 07:46:41AM -0500, Maxwell Doose wrote:
> Replace mutex_lock() and mutex_unlock() calls in rm3100_read_mag() with
> the more modern guard(mutex)(). This will help modernize the driver and
> bring it up-to-date with modern available macros/functions.
>
> While at it, remove the now unnecessary "unlock_return" goto and
> directly return in if statements.

Perhaps we need to also put a summary of the extended critical section, so that
it will be clear that we thought about it and decided to cover that small memory
access + some bitops.

Otherwise LGTM.

--
With Best Regards,
Andy Shevchenko