iio: proximity: 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:40 +0000 (11:34 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 May 2025 13:20:26 +0000 (14:20 +0100)
commitfc11c42dd13710342c05008a0bccf426247cb101
tree7b593f6e816cfc20f876f4a45af028c57e6594f9
parent175c3f72154e4ef64ba56b0ee35110082ea475b4
iio: proximity: 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-18-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/proximity/as3935.c
drivers/iio/proximity/hx9023s.c
drivers/iio/proximity/mb1232.c
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c
drivers/iio/proximity/srf08.c
drivers/iio/proximity/sx_common.c
drivers/iio/proximity/vl53l0x-i2c.c