Re: [PATCH v3 1/4] iio: accel: bmc150: convert to guard(mutex)

From: Andy Shevchenko

Date: Thu Mar 12 2026 - 10:27:25 EST


On Thu, Mar 12, 2026 at 01:49:39PM +0530, Rajveer Chaudhari wrote:
> Replace manual mutex_lock/mutex_unlock pair with guard(mutex)
> in bmc150_accel_buffer_predisable() and
> bmc150_accel_buffer_postenable(). This ensures the mutex is
> released on all return paths and allows returning directly
> without a goto label.

> v2: Cleaned mutex_unlock and goto in
> bmc150_accel_buffer_postenable(),


> Dropped Header alignment change.

I don't understand why you can't do that as prerequisite. At some point we
probably go through them to fix, but since the new header is added, it makes
sense to put it to the proper order.

Same comment to other patches in the series.

--
With Best Regards,
Andy Shevchenko