iio: accel: Use iio_push_to_buffers_with_ts() to provide length for runtime checks.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 13 Apr 2025 10:34:33 +0000 (11:34 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 May 2025 13:20:26 +0000 (14:20 +0100)
commitedfafbd82f1d416ff4710b93d9fb38e742751685
treea5d379783416c20ad82920fccd328f8a88c2b2b7
parentc65d3f3f938600345146df9f5cac7681c9f1b15e
iio: accel: Use iio_push_to_buffers_with_ts() to provide length for runtime checks.

This new function allows us to perform debug checks in the helper to ensure
that the overrun does not occur.  Use it in all the simple cases where
either a static buffer or a structure is used in the drivers.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250413103443.2420727-11-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
14 files changed:
drivers/iio/accel/adxl355_core.c
drivers/iio/accel/bma180.c
drivers/iio/accel/bma220_spi.c
drivers/iio/accel/bma400_core.c
drivers/iio/accel/fxls8962af-core.c
drivers/iio/accel/kxcjk-1013.c
drivers/iio/accel/kxsd9.c
drivers/iio/accel/mma7455_core.c
drivers/iio/accel/mma8452.c
drivers/iio/accel/msa311.c
drivers/iio/accel/mxc4005.c
drivers/iio/accel/sca3300.c
drivers/iio/accel/stk8312.c
drivers/iio/accel/stk8ba50.c