All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: imu: bmi323: use min_t() for watermark limit
@ 2026-06-07 13:22 Hungyu Lin
  2026-06-07 17:28 ` David Laight
  0 siblings, 1 reply; 2+ messages in thread
From: Hungyu Lin @ 2026-06-07 13:22 UTC (permalink / raw)
  To: jagathjog1996, jic23
  Cc: dlechner, nuno.sa, andy, linux-iio, linux-kernel, Hungyu Lin

Use min_t(u32, ...) instead of min() with an explicit cast to
match the argument types and address a checkpatch.pl warning.

No functional change intended.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
 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..38ad05f9ef58 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_t(u32, val, BMI323_FIFO_FULL_IN_FRAMES);
 
 	guard(mutex)(&data->mutex);
 	data->watermark = val;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-07 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-07 13:22 [PATCH] iio: imu: bmi323: use min_t() for watermark limit Hungyu Lin
2026-06-07 17:28 ` David Laight

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.