From: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: "Andy Shevchenko" <andy@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] iio: pressure: bmp280: use IIO_DECLARE_BUFFER_WITH_TS
Date: Mon, 21 Apr 2025 13:55:40 +0100 [thread overview]
Message-ID: <20250421135540.1a667221@jic23-huawei> (raw)
In-Reply-To: <9cdb05b5-299c-472f-a582-13a7d1368f3b@baylibre.com>
On Sat, 19 Apr 2025 13:04:08 -0500
David Lechner <dlechner@baylibre.com> wrote:
> On 4/19/25 11:39 AM, Andy Shevchenko wrote:
> > On Fri, Apr 18, 2025 at 05:58:35PM -0500, David Lechner wrote:
> >> Use IIO_DECLARE_BUFFER_WITH_TS to declare the buffer that gets used with
> >> iio_push_to_buffers_with_ts(). This makes the code a bit easier to read
> >> and understand.
> >>
> >> The data type is changed so that we can drop the casts when the buffer
> >> is used.
> >
> > This one is good, with the comment to have it DMA aligned.
> >
> > Reviewed-by: Andy Shevchenko <andy@kernel.org>
> >
>
> Strictly speaking, this one doesn't need to be DMA-safe. This buffer isn't
> passed to SPI or any other bus. It is just used for iio_push_to_buffers_with_ts()
> and has data copied to it from elsewhere just before that.
Silly question. Why is it not just locally on the stack? It's only 16 or 24 bytes...
I think that other than the bme280 we can use structures. (That one has 3 32bit channels)
So we can have the more readable form in all but one place in the driver.
Jonathan
next prev parent reply other threads:[~2025-04-21 12:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 22:58 [PATCH 0/4] iio: introduce IIO_DECLARE_BUFFER_WITH_TS David Lechner
2025-04-18 22:58 ` [PATCH 1/4] " David Lechner
2025-04-19 16:33 ` Andy Shevchenko
2025-04-21 22:40 ` David Lechner
2025-04-22 6:36 ` Andy Shevchenko
2025-04-22 16:15 ` David Lechner
2025-04-19 16:35 ` Andy Shevchenko
2025-04-21 13:24 ` Nuno Sá
2025-04-18 22:58 ` [PATCH 2/4] iio: adc: ad4695: use IIO_DECLARE_BUFFER_WITH_TS David Lechner
2025-04-19 16:38 ` Andy Shevchenko
2025-04-19 17:57 ` David Lechner
2025-04-21 12:50 ` Jonathan Cameron
2025-04-18 22:58 ` [PATCH 3/4] iio: adc: ad7380: " David Lechner
2025-04-19 16:38 ` Andy Shevchenko
2025-04-19 17:59 ` David Lechner
2025-04-18 22:58 ` [PATCH 4/4] iio: pressure: bmp280: " David Lechner
2025-04-19 16:39 ` Andy Shevchenko
2025-04-19 18:04 ` David Lechner
2025-04-21 12:55 ` Jonathan Cameron [this message]
2025-04-20 4:36 ` [PATCH 0/4] iio: introduce IIO_DECLARE_BUFFER_WITH_TS Andy Shevchenko
2025-04-21 13:03 ` Jonathan Cameron
2025-04-21 15:03 ` David Lechner
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=20250421135540.1a667221@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/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