[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2f321215-2ca3-4249-a9f0-427004c95d70@gmail.com>
Date: Thu, 21 Nov 2024 14:54:10 +0100
From: Javier Carrasco <javier.carrasco.cruz@...il.com>
To: Matti Vaittinen <mazziesaccount@...il.com>,
Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc: Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen
<lars@...afoo.de>, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] iio: Use __cleanup for a few ROHM sensors
On 21/11/2024 14:04, Matti Vaittinen wrote:
> Use __cleanup.
>
> The series converts the rest of the ROHM sensors (maintained by me) to
> use guard(mutex). This simplifies the error paths.
>
> As a note, kx022a accelerometer driver is handled in another series,
> which also adds support for two new accelerometers. I did also patch the
> driver for the BU27008 and BU27010 - but when I was testing the changes
> I found that the BU27008 status is set to "obsolete". I'll try to dig
> some information about the BU27010 and decide if having the driver
> in-tree is still worth the effort, or if I should just send out patches
> to drop it all. Hence patch to rohm-bu27008.c is not included in the
> series. If someone is actually using the BU27008 or BU27010 and wants
> to patch it - feel free to pick
> 131315de97ff ("iio: bu27008: simplify using guard(mutex)")
> from
> https://github.com/M-Vaittinen/linux/tree/bu27008-cleanup
>
> ---
>
> Matti Vaittinen (2):
> iio: bu27034: simplify using guard(mutex)
> iio: bm1390: simplify using guard(mutex)
>
> drivers/iio/light/rohm-bu27034.c | 73 ++++++++++------------------
> drivers/iio/pressure/rohm-bm1390.c | 78 ++++++++++++------------------
> 2 files changed, 55 insertions(+), 96 deletions(-)
>
>
> base-commit: adc218676eef25575469234709c2d87185ca223a
Hi Matti,
Both patches look good to me, but I noticed that you kept a few
mutex_lock() + mutex_unlock() in both drivers, in particular in the
cases where a scoped_guard() could simplify the code. Did you leave
those cases untouched on purpose?
Best regards,
Javier Carrasco
Powered by blists - more mailing lists