Re: [PATCH v2] iio: imu: bno055: add explicit scan buf layout
From: David Lechner
Date: Sat Mar 14 2026 - 17:39:55 EST
On 3/2/26 2:59 AM, Andy Shevchenko wrote:
> 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>
>
Forgot to mention in v3 that I didn't pick up the tag because I
changed it significantly, so worth another look.