iio: accel: bmc150: use iio_push_to_buffers_with_ts()
PATCH 1/1 iio: accel: bmc150: use iio_push_to_buffers_with_ts()
Replace deprecated iio_push_to_buffers_with_timestamp() with iio_push_to_buffers_with_ts() to allow source size runtime checks.
---
Follow-up suggested in:
https://lore.kernel.org/linux-iio/[email protected]/
drivers/iio/accel/bmc150-accel-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +4 -4
@@ -1011,8 +1011,8 @@ static int __bmc150_accel_fifo_flush(struct iio_dev *indio_dev,memcpy (&data->scan.channels[j++], &buffer[i *3 + bit],sizeof (data->scan.channels[0 ])); -iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, - tstamp); +iio_push_to_buffers_with_ts (indio_dev, &data->scan, +sizeof (data->scan), tstamp); tstamp += sample_period; }
@@ -1196,8 +1196,8 @@ static irqreturn_t bmc150_accel_trigger_handler(int irq, void *p)if (ret <0 ) goto err_read; -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, - pf->timestamp); +iio_push_to_buffers_with_ts (indio_dev, data->buffer, +sizeof (data->buffer), pf->timestamp); err_read:iio_trigger_notify_done (indio_dev->trig);
Signature · 1 line
2.43.0
Quoted 8 lines · Yash Suthar
Replace deprecated
iio_push_to_buffers_with_timestamp()withiio_push_to_buffers_with_ts()to allow source size runtime checks.Signed-off-by Yash Suthar <[email protected]>---
Follow-up suggested in:
https://lore.kernel.org/linux-iio/[email protected]/
There is a tag Suggested-by. Use it.
--
With Best Regards,
Andy Shevchenko
PATCH v2 1/1 iio: accel: bmc150: use iio_push_to_buffers_with_ts()
In reply to Yash SutharReplace deprecated iio_push_to_buffers_with_timestamp() with iio_push_to_buffers_with_ts() to allow source size runtime checks.
---
v2:
- Add Suggested-by tag
drivers/iio/accel/bmc150-accel-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +4 -4
@@ -1011,8 +1011,8 @@ static int __bmc150_accel_fifo_flush(struct iio_dev *indio_dev,memcpy (&data->scan.channels[j++], &buffer[i *3 + bit],sizeof (data->scan.channels[0 ])); -iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, - tstamp); +iio_push_to_buffers_with_ts (indio_dev, &data->scan, +sizeof (data->scan), tstamp); tstamp += sample_period; }
@@ -1196,8 +1196,8 @@ static irqreturn_t bmc150_accel_trigger_handler(int irq, void *p)if (ret <0 ) goto err_read; -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, - pf->timestamp); +iio_push_to_buffers_with_ts (indio_dev, data->buffer, +sizeof (data->buffer), pf->timestamp); err_read:iio_trigger_notify_done (indio_dev->trig);
Signature · 1 line
2.43.0
Jonathan Cameron
maintainerQuoted 5 lines · On Sun, 9 Aug 2026 23:19:28 +0530 Yash Suthar <[email protected]> wrote:
Replace deprecated
iio_push_to_buffers_with_timestamp()withiio_push_to_buffers_with_ts()to allow source size runtime checks.Suggested-by David Lechner <[email protected]>Signed-off-by Yash Suthar <[email protected]>
See the other thread. Given there will be dependencies between the patches, for v3, send them as a thread with an appropriate cover letter.
Thanks,
Jonathan
Quoted 33 lines
---
v2:
- Add Suggested-by tagdrivers/iio/accel/bmc150-accel-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/iio/accel/bmc150-accel-core.c +4
-4@@ -1011,8 +1011,8 @@ static int __bmc150_accel_fifo_flush(struct iio_dev *indio_dev,memcpy (&data->scan.channels[j++], &buffer[i *3 + bit],sizeof (data->scan.channels[0 ])); -iio_push_to_buffers_with_timestamp (indio_dev, &data->scan, - tstamp); +iio_push_to_buffers_with_ts (indio_dev, &data->scan, +sizeof (data->scan), tstamp); tstamp += sample_period; }@@ -1196,8 +1196,8 @@ static irqreturn_t bmc150_accel_trigger_handler(int irq, void *p)if (ret <0 ) goto err_read; -iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, - pf->timestamp); +iio_push_to_buffers_with_ts (indio_dev, data->buffer, +sizeof (data->buffer), pf->timestamp); err_read:iio_trigger_notify_done (indio_dev->trig);