[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAPQ2b5E9S1gMddP@smile.fi.intel.com>
Date: Sat, 19 Apr 2025 19:35:37 +0300
From: Andy Shevchenko <andy@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
Nuno Sá <nuno.sa@...log.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] iio: introduce IIO_DECLARE_BUFFER_WITH_TS
On Fri, Apr 18, 2025 at 05:58:32PM -0500, David Lechner wrote:
> Add a new macro to help with the common case of declaring a buffer that
> is safe to use with iio_push_to_buffers_with_ts(). This is not trivial
> to do correctly because of the alignment requirements of the timestamp.
> This will make it easier for both authors and reviewers.
...
> +#define IIO_DECLARE_BUFFER_WITH_TS(type, name, count) \
> + type name[ALIGN((count), sizeof(s64) / sizeof(type)) \
> + + sizeof(s64)/ sizeof(type)] __aligned(sizeof(s64))
We have two alignments in a row in most of the cases, I would think that the
proper one is for DMA and this should not be used at all, it actually might be
a bug in bmp280.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists