diff mbox series

[01/20] iio: adc: ad7944: Fix sign and use aligned_s64 for timestamp.

Message ID 20241215182912.481706-2-jic23@kernel.org (mailing list archive)
State New
Headers show
Series IIO: Tidying up timestamp alignment markings. | expand

Commit Message

Jonathan Cameron Dec. 15, 2024, 6:28 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Whilst it doesn't actually make any difference because the code
that fills this field doesn't care, timestamps are all signed.
Use the new aligned_s64 instead of open coding alignment to avoid
confusing static analyzers and give slightly cleaner code.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/adc/ad7944.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Lechner Dec. 15, 2024, 6:36 p.m. UTC | #1
On 12/15/24 12:28 PM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Whilst it doesn't actually make any difference because the code
> that fills this field doesn't care, timestamps are all signed.
> Use the new aligned_s64 instead of open coding alignment to avoid
> confusing static analyzers and give slightly cleaner code.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---

Reviewed-by: David Lechner <dlechner@baylibre.com>
diff mbox series

Patch

diff --git a/drivers/iio/adc/ad7944.c b/drivers/iio/adc/ad7944.c
index a5aea4e9f1a7..0ec9cda10f5f 100644
--- a/drivers/iio/adc/ad7944.c
+++ b/drivers/iio/adc/ad7944.c
@@ -75,7 +75,7 @@  struct ad7944_adc {
 			u16 u16;
 			u32 u32;
 		} raw;
-		u64 timestamp __aligned(8);
+		aligned_s64 timestamp;
 	 } sample __aligned(IIO_DMA_MINALIGN);
 };