mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
iio: imu: bmi323: remove unnecessary cast in watermark limit
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: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
2766d92b05
commit
37a2232792
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user