| From stable+bounces-172681-greg=kroah.com@vger.kernel.org Sun Aug 24 03:29:41 2025 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Sat, 23 Aug 2025 21:29:31 -0400 |
| Subject: iio: light: Use aligned_s64 instead of open coding alignment. |
| To: stable@vger.kernel.org |
| Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>, Matti Vaittinen <mazziesaccount@gmail.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Sasha Levin <sashal@kernel.org> |
| Message-ID: <20250824012932.2578686-1-sashal@kernel.org> |
| |
| From: Jonathan Cameron <Jonathan.Cameron@huawei.com> |
| |
| [ Upstream commit a801016da0bbb955acf1a551584790e3816bb4db ] |
| |
| 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> |
| Stable-dep-of: 433b99e92294 ("iio: light: as73211: Ensure buffer holes are zeroed") |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| --- |
| drivers/iio/light/adjd_s311.c | 2 +- |
| drivers/iio/light/as73211.c | 2 +- |
| drivers/iio/light/bh1745.c | 2 +- |
| drivers/iio/light/isl29125.c | 2 +- |
| drivers/iio/light/ltr501.c | 2 +- |
| drivers/iio/light/max44000.c | 2 +- |
| drivers/iio/light/rohm-bu27034.c | 2 +- |
| drivers/iio/light/rpr0521.c | 2 +- |
| drivers/iio/light/st_uvis25.h | 2 +- |
| drivers/iio/light/tcs3414.c | 2 +- |
| drivers/iio/light/tcs3472.c | 2 +- |
| 11 files changed, 11 insertions(+), 11 deletions(-) |
| |
| --- a/drivers/iio/light/adjd_s311.c |
| +++ b/drivers/iio/light/adjd_s311.c |
| @@ -56,7 +56,7 @@ struct adjd_s311_data { |
| struct i2c_client *client; |
| struct { |
| s16 chans[4]; |
| - s64 ts __aligned(8); |
| + aligned_s64 ts; |
| } scan; |
| }; |
| |
| --- a/drivers/iio/light/as73211.c |
| +++ b/drivers/iio/light/as73211.c |
| @@ -642,7 +642,7 @@ static irqreturn_t as73211_trigger_handl |
| struct as73211_data *data = iio_priv(indio_dev); |
| struct { |
| __le16 chan[4]; |
| - s64 ts __aligned(8); |
| + aligned_s64 ts; |
| } scan; |
| int data_result, ret; |
| |
| --- a/drivers/iio/light/bh1745.c |
| +++ b/drivers/iio/light/bh1745.c |
| @@ -743,7 +743,7 @@ static irqreturn_t bh1745_trigger_handle |
| struct bh1745_data *data = iio_priv(indio_dev); |
| struct { |
| u16 chans[4]; |
| - s64 timestamp __aligned(8); |
| + aligned_s64 timestamp; |
| } scan; |
| u16 value; |
| int ret; |
| --- a/drivers/iio/light/isl29125.c |
| +++ b/drivers/iio/light/isl29125.c |
| @@ -54,7 +54,7 @@ struct isl29125_data { |
| /* Ensure timestamp is naturally aligned */ |
| struct { |
| u16 chans[3]; |
| - s64 timestamp __aligned(8); |
| + aligned_s64 timestamp; |
| } scan; |
| }; |
| |
| --- a/drivers/iio/light/ltr501.c |
| +++ b/drivers/iio/light/ltr501.c |
| @@ -1285,7 +1285,7 @@ static irqreturn_t ltr501_trigger_handle |
| 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; |
| --- a/drivers/iio/light/max44000.c |
| +++ b/drivers/iio/light/max44000.c |
| @@ -78,7 +78,7 @@ struct max44000_data { |
| /* Ensure naturally aligned timestamp */ |
| struct { |
| u16 channels[2]; |
| - s64 ts __aligned(8); |
| + aligned_s64 ts; |
| } scan; |
| }; |
| |
| --- a/drivers/iio/light/rohm-bu27034.c |
| +++ b/drivers/iio/light/rohm-bu27034.c |
| @@ -205,7 +205,7 @@ struct bu27034_data { |
| struct { |
| u32 mlux; |
| __le16 channels[BU27034_NUM_HW_DATA_CHANS]; |
| - s64 ts __aligned(8); |
| + aligned_s64 ts; |
| } scan; |
| }; |
| |
| --- a/drivers/iio/light/rpr0521.c |
| +++ b/drivers/iio/light/rpr0521.c |
| @@ -203,7 +203,7 @@ struct rpr0521_data { |
| struct { |
| __le16 channels[3]; |
| u8 garbage; |
| - s64 ts __aligned(8); |
| + aligned_s64 ts; |
| } scan; |
| }; |
| |
| --- a/drivers/iio/light/st_uvis25.h |
| +++ b/drivers/iio/light/st_uvis25.h |
| @@ -30,7 +30,7 @@ struct st_uvis25_hw { |
| /* Ensure timestamp is naturally aligned */ |
| struct { |
| u8 chan; |
| - s64 ts __aligned(8); |
| + aligned_s64 ts; |
| } scan; |
| }; |
| |
| --- a/drivers/iio/light/tcs3414.c |
| +++ b/drivers/iio/light/tcs3414.c |
| @@ -56,7 +56,7 @@ struct tcs3414_data { |
| /* Ensure timestamp is naturally aligned */ |
| struct { |
| u16 chans[4]; |
| - s64 timestamp __aligned(8); |
| + aligned_s64 timestamp; |
| } scan; |
| }; |
| |
| --- a/drivers/iio/light/tcs3472.c |
| +++ b/drivers/iio/light/tcs3472.c |
| @@ -67,7 +67,7 @@ struct tcs3472_data { |
| /* Ensure timestamp is naturally aligned */ |
| struct { |
| u16 chans[4]; |
| - s64 timestamp __aligned(8); |
| + aligned_s64 timestamp; |
| } scan; |
| }; |
| |