From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> I finally got around to do a manual audit of all the calls to iio_push_to_buffers_with_timestamp() which has the somewhat odd requirements of: 1. 8 byte alignment of the provided buffer. 2. space for an 8 byte naturally aligned timestamp to be inserted at the end. Unfortunately there were rather a lot of these left, but time to bite the bullet and clean them up. As discussed previous in https://lore.kernel.org/linux-iio/20200920112742.170751-1-jic23@xxxxxxxxxx/ it is not easy to fix the alignment issue without requiring a bounce buffer. This final part of the 4 sets of fixes is concerned with the cases where bounce buffers are the proposed solutions. In these cases we have hardware that reads a prefix that we wish to drop. That makes it hard to directly read the data into the correct location. Rather than implementing bouce buffers in each case, this set provides some magic in the core to handle them via a new function. iio_push_to_buffers_with_ts_na() - non aligned Note this is totally untested as I don't have suitable hardware or emulation. I can fake something up in the dummy driver or via QEMU but I definitely want both eyes and testing on this series! Cc: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx> Cc: Nuno Sa <nuno.sa@xxxxxxxxxx> Jonathan Cameron (4): iio: core: Introduce iio_push_to_buffers_with_ts_na() for non aligned case. iio: adc: ti-adc108s102: Fix alignment of buffer pushed to iio buffers. iio: gyro: mpu3050: Fix alignment and size issues with buffers. iio: imu: adis16400: Fix buffer alignment requirements. drivers/iio/adc/ti-adc108s102.c | 11 +++++----- drivers/iio/gyro/mpu3050-core.c | 24 ++++++++++----------- drivers/iio/imu/adis16400.c | 20 ++++++++++++----- drivers/iio/industrialio-buffer.c | 36 +++++++++++++++++++++++++++++++ include/linux/iio/buffer.h | 4 ++++ include/linux/iio/iio-opaque.h | 4 ++++ 6 files changed, 76 insertions(+), 23 deletions(-) -- 2.31.1