Re: [PATCH v2] iio: imu: bno055: add explicit scan buf layout
From: Andy Shevchenko
Date: Mon Mar 02 2026 - 04:03:21 EST
On Sat, Feb 28, 2026 at 02:15:51PM -0600, David Lechner wrote:
> Move the scan buf.chans array into a union along with a struct that
> gives the layout of the buffer with all channels enabled.
>
> Although not technically required in this case, if there had been a
> different number of items before the quaternion, there could have been
> a subtle bug with the special alignment needed for the quaternion
> channel data and the array would have been too small.
Cool thing!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko