public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] IIO: Alignment fixes part 1 - sizes too small as well.
@ 2021-05-01 16:53 Jonathan Cameron
  2021-05-01 16:53 ` [PATCH 1/2] iio: adc: ad7768-1: Fix too small buffer passed to iio_push_to_buffers_with_timestamp() Jonathan Cameron
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jonathan Cameron @ 2021-05-01 16:53 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Daniel Junho

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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.

As discussed previous in
https://lore.kernel.org/linux-iio/20200920112742.170751-1-jic23@kernel.org/
it is not easy to fix the alignment issue without requiring a bounce buffer
(see part 4 of the alignment fixes for a proposal for that where it is
absolutely necessary).

In these cases the buffer is neither big enough, nor correctly aligned
so fix both issues in one go.

Cc: Daniel Junho <djunho@gmail.com>

Jonathan Cameron (2):
  iio: adc: ad7768-1: Fix too small buffer passed to
    iio_push_to_buffers_with_timestamp()
  iio: adc: ad7923: Fix undersized rx buffer.

 drivers/iio/adc/ad7768-1.c | 8 ++++++--
 drivers/iio/adc/ad7923.c   | 4 +++-
 2 files changed, 9 insertions(+), 3 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-13 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-01 16:53 [PATCH 0/2] IIO: Alignment fixes part 1 - sizes too small as well Jonathan Cameron
2021-05-01 16:53 ` [PATCH 1/2] iio: adc: ad7768-1: Fix too small buffer passed to iio_push_to_buffers_with_timestamp() Jonathan Cameron
2021-05-01 16:53 ` [PATCH 2/2] iio: adc: ad7923: Fix undersized rx buffer Jonathan Cameron
2021-05-01 19:14 ` [PATCH 0/2] IIO: Alignment fixes part 1 - sizes too small as well Andy Shevchenko
2021-05-13 17:14   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox