]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iio: imu: Use aligned_s64 instead of open coding alignment.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Dec 2024 18:29:00 +0000 (18:29 +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.

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

index f7d7f4442e65f5ee10d20f2f1b0ad5386c82f0b6..7f386c5e58b46d0bded452dcdde28667ee4402fa 100644 (file)
@@ -174,7 +174,7 @@ struct bmi323_data {
        __le16 fifo_buff[BMI323_FIFO_FULL_IN_WORDS] __aligned(IIO_DMA_MINALIGN);
        struct {
                __le16 channels[BMI323_CHAN_MAX];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } buffer;
        __le16 steps_count[BMI323_STEP_LEN];
 };
index 59814de042c7d6d69547eb2adc9e1174a7e0c324..597c402b98dedf0c43248642e34748e9274b2e9d 100644 (file)
@@ -207,7 +207,7 @@ struct bno055_priv {
        bool sw_reset;
        struct {
                __le16 chans[BNO055_SCAN_CH_COUNT];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } buf;
        struct dentry *debugfs;
 };