From: Jonathan Cameron Date: Sun, 13 Apr 2025 10:34:25 +0000 (+0100) Subject: iio: adc: ad7768-1: Fix insufficient alignment of timestamp. X-Git-Tag: v6.15-rc6~11^2~2^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ffbc26bc91c1f1eb3dcf5d8776e74cbae21ee13a;p=thirdparty%2Flinux.git iio: adc: ad7768-1: Fix insufficient alignment of timestamp. 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 Reviewed-by: Nuno Sá Reviewed-by: David Lechner Link: https://patch.msgid.link/20250413103443.2420727-3-jic23@kernel.org Cc: Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c index 5a863005aca6d..5e0be36af0c5c 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];