Re: [RFC PATCH 3/4] iio: gyro: mpu3050: Fix alignment and size issues with buffers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 1, 2021 at 7:26 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
>
> Fix a set of closely related issues.
> 1. When using fifo_values() there was not enough space for the timestamp to
>    be inserted by iio_push_to_buffers_with_timestamp()
> 2. fifo_values() did not meet the alignment requirement of
>    iio_push_to_buffers_with_timestamp()
> 3. hw_values did not meet the alignment requirement either.
>
> 1 and 2 fixed by using new iio_push_to_buffers_with_ts_na() which has
> no alignment or space padding requirements.
> 3 fixed by introducing a structure that makes the space and alignment
> requirements explicit.
>
> Fixes: 3904b28efb2c ("iio: gyro: Add driver for the MPU-3050 gyroscope")
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>

Again a very nice fix:
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Again I wonder how we can help driver authors to always get this right.

Yours,
Linus Walleij



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux