iio: gyro: 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-12-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Jonathan Cameron 2024-12-15 18:29:02 +00:00
parent 15fd16d296
commit 5532cd9d1d
4 changed files with 4 additions and 4 deletions

View file

@ -75,7 +75,7 @@ struct adxrs290_state {
/* Ensure correct alignment of timestamp when present */
struct {
s16 channels[3];
s64 ts __aligned(8);
aligned_s64 ts;
} buffer;
};

View file

@ -99,7 +99,7 @@ struct bmg160_data {
/* Ensure naturally aligned timestamp */
struct {
s16 chans[3];
s64 timestamp __aligned(8);
aligned_s64 timestamp;
} scan;
u32 dps_range;
int ev_enable_state;

View file

@ -52,7 +52,7 @@ static irqreturn_t itg3200_trigger_handler(int irq, void *p)
*/
struct {
__be16 buf[ITG3200_SCAN_ELEMENTS];
s64 ts __aligned(8);
aligned_s64 ts;
} scan;
int ret = itg3200_read_all_channels(st->i2c, scan.buf);

View file

@ -474,7 +474,7 @@ static irqreturn_t mpu3050_trigger_handler(int irq, void *p)
int ret;
struct {
__be16 chans[4];
s64 timestamp __aligned(8);
aligned_s64 timestamp;
} scan;
s64 timestamp;
unsigned int datums_from_fifo = 0;