Re: [PATCH 5/8] iio: imu: inv_icm45600: add buffer support in iio devices

From: Andy Shevchenko
Date: Sat Apr 12 2025 - 15:16:41 EST


On Sat, Apr 12, 2025 at 10:14 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> On Fri, 11 Apr 2025 13:28:37 +0000
> Remi Buisson via B4 Relay <devnull+remi.buisson.tdk.com@xxxxxxxxxx> wrote:

...

> > + raw_wm = INV_ICM45600_FIFO_WATERMARK_VAL(watermark);
> > + memcpy(st->buffer, &raw_wm, sizeof(raw_wm));
> > + ret = regmap_bulk_write(st->map, INV_ICM45600_REG_FIFO_WATERMARK,
> > + st->buffer, sizeof(raw_wm));
> > + if (ret)
> > + return ret;
> > +
> > + return 0;
> trivial but return regmap_bulk_write()

Actually looking at this I think it should have proper __be16/__le16
(or what is there?) types and use respective putter-getter instead of
memcpy().

--
With Best Regards,
Andy Shevchenko