]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: magnetometer: Use aligned_s64 instead of open coding alignment.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Dec 2024 18:28:58 +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.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241215182912.481706-8-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/magnetometer/af8133j.c
drivers/iio/magnetometer/ak8974.c
drivers/iio/magnetometer/ak8975.c
drivers/iio/magnetometer/bmc150_magn.c
drivers/iio/magnetometer/hmc5843.h
drivers/iio/magnetometer/mag3110.c
drivers/iio/magnetometer/yamaha-yas530.c

index acd291f3e7924c8cd8447bf884453256d74362c2..a70bf8a3c73b768f81f6200d94918853920952f7 100644 (file)
@@ -360,7 +360,7 @@ static irqreturn_t af8133j_trigger_handler(int irq, void *p)
        s64 timestamp = iio_get_time_ns(indio_dev);
        struct {
                __le16 values[3];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } sample;
        int ret;
 
index 8306a18706accf3e5b1e2b29514903b2682c9f39..08975c60e325cbef2e425b41cc84bbc9a5fe5a1f 100644 (file)
@@ -197,7 +197,7 @@ struct ak8974 {
        /* Ensure timestamp is naturally aligned */
        struct {
                __le16 channels[3];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index 18077fb463a9127c35eb1d8ab9654c69ec285c4a..ef1363126cc2d4ce2a1dc1ccb916c2ad069544d8 100644 (file)
@@ -426,7 +426,7 @@ struct ak8975_data {
        /* Ensure natural alignment of timestamp */
        struct {
                s16 channels[3];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index 7f545740178edfbb77e5cb4e6d297b9cb89908f8..88bb673e40d82b1aa78d7a567e9f3c08fcdf8617 100644 (file)
@@ -140,7 +140,7 @@ struct bmc150_magn_data {
        /* Ensure timestamp is naturally aligned */
        struct {
                s32 chans[3];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        struct iio_trigger *dready_trig;
        bool dready_trigger_on;
index 60fbb5431c8809339e8f89c27e359732b2e1d159..ffd669b1ee7c02b3bba5538ea29ea32b6e74762d 100644 (file)
@@ -44,7 +44,7 @@ struct hmc5843_data {
        struct iio_mount_matrix orientation;
        struct {
                __be16 chans[3];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
 };
 
index 5295dc0100e4c12ba7dcf635fb09fa4e8478aebf..2fe8e97f2cf86385b9bb342171b85a857e2151c3 100644 (file)
@@ -60,7 +60,7 @@ struct mag3110_data {
        struct {
                __be16 channels[3];
                u8 temperature;
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index 65011a8598d33292c07463ecfe218698cb40c456..bba9f4d7c90a4bf99a00fba3c7af9958854b89c9 100644 (file)
@@ -236,7 +236,7 @@ struct yas5xx {
         */
        struct {
                s32 channels[4];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };