Re: [PATCH v2 2/4] iio: magnetometer: rm3100: Use scoped_guard() in rm3100_get_samp_freq()

Maxwell Doose
2026-04-28T17:08:55Z

On Tue, Apr 28, 2026 at 10:25 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> I'd just use a guard and not worry about two value lookups from static const data
> being under the guard()

We'd probably want to keep the scope as close as possible to the
original code, but it's your call, I can use guard(mutex)() instead.

> Why is this series broken up into lots of patches doing same type of change
> in different places? This could definitely be combined with the previous patch.

I've had some suggestions on other patches to split some changes, and
thus, I've been erring on the side of atomicity. I can see now how
this probably should be combined, and I'll merge these for a v3 and
add the suggested fixes for when I have free time.

best regards,
maxwell