]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
io: adc: ina2xx-adc: Fix sign and use aligned_s64 for timestamp.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Dec 2024 18:28:53 +0000 (18:28 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Dec 2024 14:28:14 +0000 (14:28 +0000)
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.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241215182912.481706-3-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ina2xx-adc.c

index 48c95e12e791f266bf04eb04c0241fccc98433ce..40d14faa71c50b3b6b54b4bedb754f77a6ae3687 100644 (file)
@@ -150,7 +150,7 @@ struct ina2xx_chip_info {
        /* data buffer needs space for channel data and timestamp */
        struct {
                u16 chan[4];
-               u64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };