All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Daniel Junho <djunho@gmail.com>
Subject: Re: [PATCH 0/2] IIO: Alignment fixes part 1 - sizes too small as well.
Date: Sat, 1 May 2021 22:14:16 +0300	[thread overview]
Message-ID: <CAHp75VefwPWqZfqCT0HmPgoer6_dvnR+VJ0mnOSvF-_tHqq4GA@mail.gmail.com> (raw)
In-Reply-To: <20210501165314.511954-1-jic23@kernel.org>

On Sat, May 1, 2021 at 7:55 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> 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.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> 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
>


-- 
With Best Regards,
Andy Shevchenko

  parent reply	other threads:[~2021-05-01 19:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Andy Shevchenko [this message]
2021-05-13 17:14   ` [PATCH 0/2] IIO: Alignment fixes part 1 - sizes too small as well Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHp75VefwPWqZfqCT0HmPgoer6_dvnR+VJ0mnOSvF-_tHqq4GA@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=djunho@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.