From: Gabriel Rondon <grondon@gmail.com>
To: jic23@kernel.org
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
andy@kernel.org, nuno.sa@analog.com, dlechner@baylibre.com
Subject: Re: [PATCH] iio: accel: bmc150: use guard(mutex) for mutex handling
Date: Wed, 20 May 2026 11:12:44 +0100 [thread overview]
Message-ID: <20260520101244.64434-1-grondon@gmail.com> (raw)
On Mon, 20 Apr 2026 19:15:19 +0100
Jonathan Cameron <jic23@kernel.org> wrote:
> Not sure this list is useful in the commit log. Rather verbose.
Dropped the function list from the commit log in v2.
> I took a quick look and can't see anything beyond an if (ret) check
> in bmc150_accel_get_axis()
> If it's the only one left I'd use scoped_guard() for
> bmc150_accel_trigger_handler()
Agreed. v2 also converts bmc150_accel_get_axis() to guard(mutex), and
uses scoped_guard() for bmc150_accel_trigger_handler(), so no manual
mutex_lock()/mutex_unlock() pairs remain in the touched code.
> Unrelated change [int ret; movement] - here it just acts as noise
> [...] don't do this sort of code movement of lines we aren't
> otherwise touching.
Reverted; v2 leaves the declaration order in bmc150_accel_get_temp()
untouched.
> return sprintf(buf, "%d\n", data->watermark);
> [...] maybe also return sysfs_emit(...) is appropriate.
Done for bmc150_accel_get_fifo_watermark() and
bmc150_accel_get_fifo_state(); the intermediate variables are gone.
These already use sysfs_emit() in the current iio tree, so v2 keeps
sysfs_emit() and returns directly.
> Unrelated but [...] val = min(val, BMC150_ACCEL_FIFO_LENGTH);
Left out of v2 to keep this to a single logical change. Happy to send
it as a separate cleanup.
Thanks for the review.
Gabriel
next reply other threads:[~2026-05-20 10:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 10:12 Gabriel Rondon [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-04-08 8:28 Gabriel Rondon
2026-04-20 18:15 ` Jonathan Cameron
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=20260520101244.64434-1-grondon@gmail.com \
--to=grondon@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.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®