Re: [PATCH v2] iio: imu: bmi323: remove unnecessary cast in watermark limit

From: Jonathan Cameron

Date: Wed Jun 10 2026 - 11:48:51 EST


On Tue, 9 Jun 2026 16:28:31 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Mon, Jun 08, 2026 at 12:15:58PM +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.
>
> Right, now it looks much better.
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>


Agreed. Easy to check these min conditions as there is good documentation in
minmax.h Entry that is relevant here I think is this one.

* - Unsigned arguments can be compared against non-negative signed constants.


Applied to the testing branch of iio.git.

Thanks,

Jonathan