From: "Shengzhuo Wei" <me@cherr.cc>
To: "Jonathan Cameron" <jic23@kernel.org>
Cc: "Shengzhuo Wei" <me@cherr.cc>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Sean Nyekjaer" <sean@geanix.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
"Joshua Crofts" <joshua.crofts1@gmail.com>
Subject: Re: [PATCH RESEND v2] iio: accel: fxls8962af: clamp FIFO sample count
Date: Mon, 10 Aug 2026 12:27:07 +0800 [thread overview]
Message-ID: <anlTG3uxHEkyxtQv@pve> (raw)
In-Reply-To: <20260810003101.3a2d1967@jic23-huawei>
On 2026-08-10 00:31, Jonathan Cameron wrote:
> Same comments as similar patches.
> - Not a fix, but rather hardening against buggy hardware.
> - Don't hide the problem by clamping. If this happens in the wild
> we want to know about it!
>
Hi Jonathan,
Thanks for the feedback. I also just realized that this patch
duplicates Bryam Vargas's "iio: accel: fxls8962af: clamp the
device-reported FIFO sample count", which you've already applied — I
sent mine before noticing Bryam had gotten there first.
Since Bryam's is already in, how would you like to handle it? Either:
- just conclude here, since Bryam's already covers fxls8962af (I'll
drop mine); or
- rework to the error-out approach you described — though your
feedback (don't clamp, report it) applies just as much to Bryam's
version, so that would need the same treatment.
If you'd like the rework, the fix I'd propose is: instead of clamping
count to FXLS8962AF_FIFO_LENGTH, treat an out-of-range count as a
hardware error — dev_err() and skip the flush (don't carry on
reading), so a malfunctioning device shows up rather than being
silently papered over.
Happy to go either way.
Best regards,
Shengzhuo Wei
prev parent reply other threads:[~2026-08-10 4:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-08 21:04 [PATCH RESEND v2] iio: accel: fxls8962af: clamp FIFO sample count Shengzhuo Wei
2026-08-08 22:39 ` David Lechner
2026-08-09 23:31 ` Jonathan Cameron
2026-08-10 4:27 ` Shengzhuo Wei [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=anlTG3uxHEkyxtQv@pve \
--to=me@cherr.cc \
--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=nuno.sa@analog.com \
--cc=sean@geanix.com \
--cc=stable@vger.kernel.org \
/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