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: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241215182912.481706-14-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
__be16 sample_buf16;
__be32 sample_buf32;
} data;
- s64 timestamp __aligned(8);
+ aligned_s64 timestamp;
} scan __aligned(IIO_DMA_MINALIGN);
u8 tx_buf[2];
u8 rx_buf[2];
/* Ensure natural alignment of buffer elements */
struct {
u8 channels[2];
- s64 ts __aligned(8);
+ aligned_s64 ts;
} scan;
u8 data __aligned(IIO_DMA_MINALIGN);
int irq;
struct {
u32 data __aligned(IIO_DMA_MINALIGN);
- s64 ts __aligned(8);
+ aligned_s64 ts;
} scan;
};
const struct mcp3911_chip_info *chip;
struct {
u32 channels[MCP39XX_MAX_NUM_CHANNELS];
- s64 ts __aligned(8);
+ aligned_s64 ts;
} scan;
u8 tx_buf __aligned(IIO_DMA_MINALIGN);
struct {
u16 chan[PAC1921_NUM_MEAS_CHANS];
- s64 timestamp __aligned(8);
+ aligned_s64 timestamp;
} scan;
};
struct device *dev = priv->dev;
struct {
u16 vals[RTQ6056_MAX_CHANNEL];
- s64 timestamp __aligned(8);
+ aligned_s64 timestamp;
} data;
unsigned int raw;
int i = 0, bit, ret;
/* Ensure natural alignment of buffer elements */
struct {
u16 channel;
- s64 ts __aligned(8);
+ aligned_s64 ts;
} scan;
};
/* Buffer used to align data */
struct {
__be16 channels[4];
- s64 ts __aligned(8);
+ aligned_s64 ts;
} scan;
/*
* DMA (thus cache coherency maintenance) may require the
/* Ensure natural alignment of timestamp */
struct {
s16 chan;
- s64 timestamp __aligned(8);
+ aligned_s64 timestamp;
} scan;
int chan, ret, res;
struct ads1119_state *st = iio_priv(indio_dev);
struct {
unsigned int sample;
- s64 timestamp __aligned(8);
+ aligned_s64 timestamp;
} scan;
unsigned int index;
int ret;
struct completion completion;
struct {
u8 data[ADS131E08_NUM_DATA_BYTES_MAX];
- s64 ts __aligned(8);
+ aligned_s64 ts;
} tmp_buf;
u8 tx_buf[3] __aligned(IIO_DMA_MINALIGN);
/* Scan data for each channel */
u16 data[TI_TSC2046_MAX_CHAN];
/* Timestamp */
- s64 ts __aligned(8);
+ aligned_s64 ts;
} scan_buf;
/*
/* Ensure the timestamp is naturally aligned */
struct {
u16 chan;
- s64 timestamp __aligned(8);
+ aligned_s64 timestamp;
} scan;
};