linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [RFC PATCH 3/4] iio: gyro: mpu3050: Fix alignment and size issues with buffers.
Date: Wed, 5 May 2021 14:58:48 +0200	[thread overview]
Message-ID: <CACRpkdZJfcgHM7m=TA-qKJOOh3fmF9d+2cP3G=NSuyuhj_svww@mail.gmail.com> (raw)
In-Reply-To: <20210501172515.513486-4-jic23@kernel.org>

On Sat, May 1, 2021 at 7:26 PM Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Fix a set of closely related issues.
> 1. When using fifo_values() there was not enough space for the timestamp to
>    be inserted by iio_push_to_buffers_with_timestamp()
> 2. fifo_values() did not meet the alignment requirement of
>    iio_push_to_buffers_with_timestamp()
> 3. hw_values did not meet the alignment requirement either.
>
> 1 and 2 fixed by using new iio_push_to_buffers_with_ts_na() which has
> no alignment or space padding requirements.
> 3 fixed by introducing a structure that makes the space and alignment
> requirements explicit.
>
> Fixes: 3904b28efb2c ("iio: gyro: Add driver for the MPU-3050 gyroscope")
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>

Again a very nice fix:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Again I wonder how we can help driver authors to always get this right.

Yours,
Linus Walleij

  reply	other threads:[~2021-05-05 12:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-01 17:25 [RFC PATCH 0/4] IIO: Alignment fixes part 4 - bounce buffers for the hard cases Jonathan Cameron
2021-05-01 17:25 ` [RFC PATCH 1/4] iio: core: Introduce iio_push_to_buffers_with_ts_na() for non aligned case Jonathan Cameron
2021-05-01 19:25   ` Andy Shevchenko
2021-05-01 19:27     ` Andy Shevchenko
2021-05-02 15:37       ` Jonathan Cameron
2021-05-02 15:53     ` Jonathan Cameron
2021-05-02  9:10   ` Sa, Nuno
2021-05-02 16:08     ` Jonathan Cameron
2021-05-03  7:15       ` Sa, Nuno
2021-05-03  7:46         ` Sa, Nuno
2021-05-03 10:34           ` Andy Shevchenko
2021-05-03 10:39           ` Jonathan Cameron
2021-05-03 11:20             ` Sa, Nuno
2021-05-01 17:25 ` [RFC PATCH 2/4] iio: adc: ti-adc108s102: Fix alignment of buffer pushed to iio buffers Jonathan Cameron
2021-05-01 17:25 ` [RFC PATCH 3/4] iio: gyro: mpu3050: Fix alignment and size issues with buffers Jonathan Cameron
2021-05-05 12:58   ` Linus Walleij [this message]
2021-05-01 17:25 ` [RFC PATCH 4/4] iio: imu: adis16400: Fix buffer alignment requirements Jonathan Cameron
2021-05-02  8:52   ` Sa, Nuno

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='CACRpkdZJfcgHM7m=TA-qKJOOh3fmF9d+2cP3G=NSuyuhj_svww@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=Jonathan.Cameron@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).