Message ID | 20250406172001.2167607-3-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:43PM +0100, Jonathan Cameron wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > On architectures where an s64 is not 64 bit aligned, this may 64-bit > result insufficient alignment of the timestamp and the structure > being too small. Use aligned_s64 to force the alignment.
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 not 64 bit aligned, this may > result insufficient alignment of the timestamp and the structure > being too small. Use aligned_s64 to force the alignment. > > Fixes: a1caeebab07e ("iio: adc: ad7768-1: Fix too small buffer passed to > iio_push_to_buffers_with_timestamp()") # aligned_s64 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/ad7768-1.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c > index 5a863005aca6..5e0be36af0c5 100644 > --- a/drivers/iio/adc/ad7768-1.c > +++ b/drivers/iio/adc/ad7768-1.c > @@ -168,7 +168,7 @@ struct ad7768_state { > union { > struct { > __be32 chan; > - s64 timestamp; > + aligned_s64 timestamp; > } scan; > __be32 d32; > u8 d8[2];
diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c index 5a863005aca6..5e0be36af0c5 100644 --- a/drivers/iio/adc/ad7768-1.c +++ b/drivers/iio/adc/ad7768-1.c @@ -168,7 +168,7 @@ struct ad7768_state { union { struct { __be32 chan; - s64 timestamp; + aligned_s64 timestamp; } scan; __be32 d32; u8 d8[2];