iio: proximity: Use aligned_s64 instead of open coding alignment.

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-6-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Jonathan Cameron 2024-12-15 18:28:56 +00:00
parent bfca85fa96
commit 8ee2a74eff
6 changed files with 6 additions and 6 deletions

View File

@ -63,7 +63,7 @@ struct as3935_state {
/* Ensure timestamp is naturally aligned */
struct {
u8 chan;
s64 timestamp __aligned(8);
aligned_s64 timestamp;
} scan;
u8 buf[2] __aligned(IIO_DMA_MINALIGN);
};

View File

@ -146,7 +146,7 @@ struct hx9023s_data {
struct {
__le16 channels[HX9023S_CH_NUM];
s64 ts __aligned(8);
aligned_s64 ts;
} buffer;
/*

View File

@ -45,7 +45,7 @@ struct mb1232_data {
/* Ensure correct alignment of data to push to IIO buffer */
struct {
s16 distance;
s64 ts __aligned(8);
aligned_s64 ts;
} scan;
};

View File

@ -47,7 +47,7 @@ struct lidar_data {
/* Ensure timestamp is naturally aligned */
struct {
u16 chan;
s64 timestamp __aligned(8);
aligned_s64 timestamp;
} scan;
};

View File

@ -66,7 +66,7 @@ struct srf08_data {
/* Ensure timestamp is naturally aligned */
struct {
s16 chan;
s64 timestamp __aligned(8);
aligned_s64 timestamp;
} scan;
/* Sensor-Type */

View File

@ -125,7 +125,7 @@ struct sx_common_data {
/* Ensure correct alignment of timestamp when present. */
struct {
__be16 channels[SX_COMMON_MAX_NUM_CHANNELS];
s64 ts __aligned(8);
aligned_s64 ts;
} buffer;
unsigned int suspend_ctrl;