Re: [PATCH v2 0/2] iio: adc: Use cleanup.h guards for mutex locking

From: Joshua Crofts

Date: Tue Nov 24 2026 - 03:22:02 EST


On 23-Nov-26 18:28, Vaibhav Chahar wrote:
> Modernize mutex locking in the mcp3564 and palmas_gpadc ADC drivers by
> replacing manual mutex_lock() and mutex_unlock() calls with cleanup.h
> guard(mutex) and scoped_guard() helpers.
>
> Changes in v2:
> - Patch 1 (mcp3564): Wrap switch cases containing guard() in braces,
> add blank lines around guard() calls, and clean up the commit message.
> - Patch 2 (palmas_gpadc): New patch converting palmas_gpadc calls to
> guard(mutex).
>
> Vaibhav Chahar (2):
> iio: adc: mcp3564: Use guard() and scoped_guard() to manage mutex
> iio: adc: palmas_gpadc: Use guard(mutex) to manage locks
>
> drivers/iio/adc/mcp3564.c | 63 +++++++++++++++++++---------------
> drivers/iio/adc/palmas_gpadc.c | 46 +++++++++----------------
> 2 files changed, 53 insertions(+), 56 deletions(-)
>

Also, please don't send a v2 as a reply to v1. It hides your series
in people's inboxes and may potentially break tooling like b4.

--
Kind regards,
Joshua Crofts