]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: chemical: Use aligned_s64 instead of open coding alignment.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Dec 2024 18:29:03 +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-13-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/chemical/ccs811.c
drivers/iio/chemical/ens160_core.c
drivers/iio/chemical/scd30_core.c

index 17d1bc518bf208ad8f56ea6815e34b4b99a0f61e..451fb65dbe605610a8df94a5a228f668b5ea1e49 100644 (file)
@@ -81,7 +81,7 @@ struct ccs811_data {
        /* Ensures correct alignment of timestamp if present */
        struct {
                s16 channels[2];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
 };
 
index 4a89cd5894d9f14c7a6d093ac13e12bc434440fa..48d5ad2075b6e3e09283739f0169e8cd1b3bf2cb 100644 (file)
@@ -60,7 +60,7 @@ struct ens160_data {
        struct mutex mutex;
        struct {
                __le16 chans[2];
-               s64 timestamp __aligned(8);
+               aligned_s64 timestamp;
        } scan __aligned(IIO_DMA_MINALIGN);
        u8 fw_version[3];
        __le16 buf;
index ac3080929f0b1c472c0339b151f9d866df13753a..d613c54cb28d9c50f54a0444f2a49b7f9e8dafd1 100644 (file)
@@ -594,7 +594,7 @@ static irqreturn_t scd30_trigger_handler(int irq, void *p)
        struct scd30_state *state = iio_priv(indio_dev);
        struct {
                int data[SCD30_MEAS_COUNT];
-               s64 ts __aligned(8);
+               aligned_s64 ts;
        } scan;
        int ret;