From: Joshua Crofts <joshua.crofts1@gmail.com>
To: Salah Triki <salah.triki@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: accel: sca3000: fix frequency divider condition check
Date: Wed, 19 Aug 2026 13:51:56 +0200 [thread overview]
Message-ID: <20260819135156.00002b2c@gmail.com> (raw)
In-Reply-To: <20260819114101.28232-1-salah.triki@gmail.com>
On Wed, 19 Aug 2026 12:41:01 +0100
Salah Triki <salah.triki@gmail.com> wrote:
> When setting the sampling frequency, the check for `base_freq / 2` is
> followed by an independent `if` statement for `base_freq / 4`. If `val`
> equals `base_freq / 2`, the second check fails and falls through to the
> `else if (val != base_freq)` branch, returning `-EINVAL` erroneously.
>
> Fix this by chaining the checks with `else if`.
>
> Signed-off-by: Salah Triki <salah.triki@gmail.com>
> ---
Good catch, this issue is 10 years old!
However, you're missing a fixes tag, I think b4 will pick it up
if I leave it here since I already ran git blame.
Fixes: e0f3fc9b47e6 ("iio: accel: sca3000_core: implemented IIO_CHAN_INFO_SAMP_FREQ")
+ cc stable
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
--
Kind regards,
Joshua Crofts
next prev parent reply other threads:[~2026-08-19 11:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 11:41 [PATCH] iio: accel: sca3000: fix frequency divider condition check Salah Triki
2026-08-19 11:51 ` Joshua Crofts [this message]
2026-08-23 0:48 ` Jonathan Cameron
2026-08-19 13:38 ` Andy Shevchenko
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=20260819135156.00002b2c@gmail.com \
--to=joshua.crofts1@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 \
--cc=salah.triki@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.