While the preamble field _is_ technically big-endian, its value is always 0x2A2A, which is the same in either endianness, therefore it should be u16 instead. Signed-off-by: Bence Csókás <bence98@xxxxxxxxxx> --- drivers/i2c/busses/i2c-cp2615.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-cp2615.c b/drivers/i2c/busses/i2c-cp2615.c index 78cfecd1ea76..2824f4ba7131 100644 --- a/drivers/i2c/busses/i2c-cp2615.c +++ b/drivers/i2c/busses/i2c-cp2615.c @@ -38,7 +38,9 @@ enum cp2615_iop_msg_type { }; struct __packed cp2615_iop_msg { - __be16 preamble, length, msg; + /* always 0x2A2A, which is the same in either endianness */ + u16 preamble; + __be16 length, msg; u8 data[MAX_IOP_PAYLOAD_SIZE]; }; -- 2.31.0