From: "Nuno Sá" <noname.nuno@gmail.com>
To: Hungyu Lin <dennylin0707@gmail.com>,
jagathjog1996@gmail.com, jic23@kernel.org
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: imu: bmi323: remove unnecessary cast in watermark limit
Date: Mon, 08 Jun 2026 21:20:09 +0100 [thread overview]
Message-ID: <645b6be8c47fe772902aa7b004701f977a0b6aa6.camel@gmail.com> (raw)
In-Reply-To: <20260608121558.85429-1-dennylin0707@gmail.com>
On Mon, 2026-06-08 at 12:15 +0000, Hungyu Lin wrote:
> Remove the explicit u32 cast in the watermark limit calculation.
>
> The BMI323_FIFO_FULL_IN_FRAMES macro can be used directly with
> min() without triggering type issues.
>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> Changes in v2:
> - Drop the unnecessary cast instead of using min_t().
> - Follow reviewer feedback from David Laight and Andy Shevchenko.
>
> drivers/iio/imu/bmi323/bmi323_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/imu/bmi323/bmi323_core.c
> b/drivers/iio/imu/bmi323/bmi323_core.c
> index f3d499423399..72955a697a93 100644
> --- a/drivers/iio/imu/bmi323/bmi323_core.c
> +++ b/drivers/iio/imu/bmi323/bmi323_core.c
> @@ -1128,7 +1128,7 @@ static int bmi323_set_watermark(struct iio_dev *indio_dev,
> unsigned int val)
> {
> struct bmi323_data *data = iio_priv(indio_dev);
>
> - val = min(val, (u32)BMI323_FIFO_FULL_IN_FRAMES);
> + val = min(val, BMI323_FIFO_FULL_IN_FRAMES);
>
> guard(mutex)(&data->mutex);
> data->watermark = val;
next prev parent reply other threads:[~2026-06-08 20:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 12:15 Hungyu Lin
2026-06-08 20:20 ` Nuno Sá [this message]
2026-06-09 13:28 ` Andy Shevchenko
2026-06-10 15:36 ` 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=645b6be8c47fe772902aa7b004701f977a0b6aa6.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=andy@kernel.org \
--cc=dennylin0707@gmail.com \
--cc=dlechner@baylibre.com \
--cc=jagathjog1996@gmail.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®