From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Maxwell Doose <m32285159@gmail.com>
Cc: jic23@kernel.org, tduszyns@gmail.com,
"Joshua Crofts" <joshua.crofts1@gmail.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] iio: chemical: sps30: Replace manual locking with RAII locking
Date: Mon, 11 May 2026 13:45:13 +0300 [thread overview]
Message-ID: <agGzOcXJD6uAOB-P@ashevche-desk.local> (raw)
In-Reply-To: <20260510212427.358756-2-m32285159@gmail.com>
On Sun, May 10, 2026 at 04:24:28PM -0500, Maxwell Doose wrote:
> Replace manual mutex_lock() and mutex_unlock() calls with the much newer
> guard(mutex)() and scoped_guard() macros to enable RAII patterns,
> modernize the driver, and to increase readability.
> Add new wrapper sps30_do_meas() for cleaner locking, and rename existing
> sps30_do_meas() to __sps30_do_meas() to denote locking requirements.
Ah, I was under impression that this is (unlocked version) is used somewhere
else. Since it's not the case, the wrapper is not needed, just use guard()()
in the original code.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-05-11 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-10 21:24 Maxwell Doose
2026-05-11 10:45 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=agGzOcXJD6uAOB-P@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m32285159@gmail.com \
--cc=nuno.sa@analog.com \
--cc=tduszyns@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®