Message ID | 20250406172001.2167607-2-jic23@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | IIO: Introduce iio_push_to_buffers_with_ts() taking an input buffer length argument. | expand |
On Sun, Apr 06, 2025 at 06:19:42PM +0100, Jonathan Cameron wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > On architectures where an s64 is only aligned to 32 bits insufficient 32-bit ? > padding would be left between the earlier elements and the timestamp. > Use aligned_s64 to enforce the correct placement and ensure the > storage is large enough.
On Sun, 2025-04-06 at 18:19 +0100, Jonathan Cameron wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > On architectures where an s64 is only aligned to 32 bits insufficient > padding would be left between the earlier elements and the timestamp. > Use aligned_s64 to enforce the correct placement and ensure the > storage is large enough. > > Fixes: 54e018da3141 ("iio:ad7266: Mark transfer buffer as __be16") # > aligned_s64 is much newer. > Reported-by: David Lechner <dlechner@baylibre.com> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- Reviewed-by: Nuno Sá <nuno.sa@analog.com> > drivers/iio/adc/ad7266.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c > index 18559757f908..7fef2727f89e 100644 > --- a/drivers/iio/adc/ad7266.c > +++ b/drivers/iio/adc/ad7266.c > @@ -45,7 +45,7 @@ struct ad7266_state { > */ > struct { > __be16 sample[2]; > - s64 timestamp; > + aligned_s64 timestamp; > } data __aligned(IIO_DMA_MINALIGN); > }; >
diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c index 18559757f908..7fef2727f89e 100644 --- a/drivers/iio/adc/ad7266.c +++ b/drivers/iio/adc/ad7266.c @@ -45,7 +45,7 @@ struct ad7266_state { */ struct { __be16 sample[2]; - s64 timestamp; + aligned_s64 timestamp; } data __aligned(IIO_DMA_MINALIGN); };