]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iio: humidity: Use aligned_s64 instead of open coding alignment.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Dec 2024 18:29:01 +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-11-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/humidity/am2315.c
drivers/iio/humidity/hdc100x.c
drivers/iio/humidity/hts221.h

index 6b0aa3a3f0252bed06e1d1646f63769cac9d2bd4..2323974b805c55f3b4cdcc6cae18bdeef7f729e8 100644 (file)
@@ -35,7 +35,7 @@ struct am2315_data {
        /* Ensure timestamp is naturally aligned */
        struct {
                s16 chans[2];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
 };
 
index 9b355380c9bfb4d52644840137789253e02568f2..a303f704b7ed25a4a81dc5da3b6e3018b7ef8928 100644 (file)
@@ -44,7 +44,7 @@ struct hdc100x_data {
        /* Ensure natural alignment of timestamp */
        struct {
                __be16 channels[2];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index 721359e226cb97f7df1c32ad5ddfa20913d82592..0215f11fc35ea7bc823775b42613c0dca337bb06 100644 (file)
@@ -40,7 +40,7 @@ struct hts221_hw {
        /* Ensure natural alignment of timestamp */
        struct {
                __le16 channels[2];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };