]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iio: light: Use aligned_s64 instead of open coding alignment.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Dec 2024 18:28:59 +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 bu27034, rpr0521
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241215182912.481706-9-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/adjd_s311.c
drivers/iio/light/as73211.c
drivers/iio/light/bh1745.c
drivers/iio/light/isl29125.c
drivers/iio/light/ltr501.c
drivers/iio/light/max44000.c
drivers/iio/light/rohm-bu27034.c
drivers/iio/light/rpr0521.c
drivers/iio/light/st_uvis25.h
drivers/iio/light/tcs3414.c
drivers/iio/light/tcs3472.c

index c1b43053fbc73d81945d6cedbe3bdf97be02e00f..cf96e3dd8bc675e97e62f2cb456bf6e28537472a 100644 (file)
@@ -56,7 +56,7 @@ struct adjd_s311_data {
        struct i2c_client *client;
        struct {
                s16 chans[4];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index be0068081ebbbb37fdfb252b67a77b302ff725f6..e0d3f05fcfe7748f3517f34d373895ac5e3909bc 100644 (file)
@@ -636,7 +636,7 @@ static irqreturn_t as73211_trigger_handler(int irq __always_unused, void *p)
        struct as73211_data *data = iio_priv(indio_dev);
        struct {
                __le16 chan[4];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
        int data_result, ret;
 
index 56e32689bb97a8b450dd492e5836f58db409b2a5..00a33760893e950bed54af1eb36e43f26c10ebee 100644 (file)
@@ -739,7 +739,7 @@ static irqreturn_t bh1745_trigger_handler(int interrupt, void *p)
        struct bh1745_data *data = iio_priv(indio_dev);
        struct {
                u16 chans[4];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
        u16 value;
        int ret;
index b176bf4c884ba0950d553e2955c854f0059ef92b..326dc39e79291d06a36b18c8274fd4e352f227ae 100644 (file)
@@ -54,7 +54,7 @@ struct isl29125_data {
        /* Ensure timestamp is naturally aligned */
        struct {
                u16 chans[3];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
 };
 
index 604f5f900a2ecb8e0529b129ddca9e36ec292126..669da0840eba0884548a4c44d7522480b975aa1a 100644 (file)
@@ -1280,7 +1280,7 @@ static irqreturn_t ltr501_trigger_handler(int irq, void *p)
        struct ltr501_data *data = iio_priv(indio_dev);
        struct {
                u16 channels[3];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
        __le16 als_buf[2];
        u8 mask = 0;
index b935976871a6f08c9c9df0b7b3d952f2c8806cb9..e8b767680133207362fc2e1133e364be71bfdedd 100644 (file)
@@ -78,7 +78,7 @@ struct max44000_data {
        /* Ensure naturally aligned timestamp */
        struct {
                u16 channels[2];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index 5a3515e47871feb29d958e2f581ceabcf8a51e5c..cc25596cb248ab43c9b4d5c9d312fd8ba4cbd612 100644 (file)
@@ -206,7 +206,7 @@ struct bu27034_data {
        struct {
                u32 mlux;
                __le16 channels[BU27034_NUM_HW_DATA_CHANS];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index 56f5fbbf79ac702c627073b938d922e6b37b2827..2ba917c5c1389c420c6b479c8da70dd8890eb5b8 100644 (file)
@@ -203,7 +203,7 @@ struct rpr0521_data {
        struct {
                __le16 channels[3];
                u8 garbage;
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index 283086887caf5d4f750e7b79f01c8bf91a982aa3..1f93e3dc45c2b0d9693322dca6d682f73303f76d 100644 (file)
@@ -30,7 +30,7 @@ struct st_uvis25_hw {
        /* Ensure timestamp is naturally aligned */
        struct {
                u8 chan;
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index 4fecdf10aeb197e4e657c5df8779b9881049ee2d..884e43e4cda4af5dd38329d06ba440b69e7246f1 100644 (file)
@@ -56,7 +56,7 @@ struct tcs3414_data {
        /* Ensure timestamp is naturally aligned */
        struct {
                u16 chans[4];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
 };
 
index 4186aac04902e6b12ee7978ef19c3b47faf773f7..2bd36a344ea5c7f93d1d2e3827b84d7d61412afa 100644 (file)
@@ -67,7 +67,7 @@ struct tcs3472_data {
        /* Ensure timestamp is naturally aligned */
        struct {
                u16 chans[4];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan;
 };