]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iio: pressure: Use aligned_s64 instead of open coding alignment.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Dec 2024 18:28:57 +0000 (18:28 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 28 Dec 2024 14:28:15 +0000 (14:28 +0000)
Use this new type to both slightly simplify the code and avoid
confusing static analysis tools. Mostly this series is about consistency
to avoid this code pattern getting copied into more drivers.

Acked-By: Matti Vaittinen <mazziesaccount@gmail.com> #for the BD1390
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241215182912.481706-7-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/hsc030pa.h
drivers/iio/pressure/ms5611_core.c
drivers/iio/pressure/rohm-bm1390.c

index 9b40f46f575fff8ba7e04c9f5fd696f79d94ba9a..5db46784f4c64d3b8cd4ec220b59927f0f661b77 100644 (file)
@@ -58,7 +58,7 @@ struct hsc_data {
        s32 p_offset_dec;
        struct {
                __be16 chan[2];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        u8 buffer[HSC_REG_MEASUREMENT_RD_SIZE] __aligned(IIO_DMA_MINALIGN);
 };
index 056c8271c49d937b4331e6e731a74317022ed126..00c077b2a2a44a9b9665118733452c5e4c8d0298 100644 (file)
@@ -213,7 +213,7 @@ static irqreturn_t ms5611_trigger_handler(int irq, void *p)
        /* Ensure buffer elements are naturally aligned */
        struct {
                s32 channels[2];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
        int ret;
 
index 6cdb2820171a1f48e295885df647d948cf5336bd..9c1197f0e742d847568a81c2c43780c97eef6f9c 100644 (file)
@@ -139,7 +139,7 @@ enum {
 struct bm1390_data_buf {
        u32 pressure;
        __be16 temp;
-       s64 ts __aligned(8);
+       aligned_s64 ts;
 };
 
 /* BM1390 has FIFO for 4 pressure samples */