From cfc5f2c6deb5493d5854036f3d0f396ea4a3e99d Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Sat, 1 Aug 2015 11:50:39 +0200 Subject: [PATCH] greybus: uart: fix message packing Add missing packed attributes to prevent implicit structure padding. Signed-off-by: Johan Hovold Reviewed-by: Alex Elder Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/greybus_protocols.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h index 121300a84e1c..cdd5b54874bd 100644 --- a/drivers/staging/greybus/greybus_protocols.h +++ b/drivers/staging/greybus/greybus_protocols.h @@ -678,7 +678,7 @@ struct gb_uart_recv_data_request { __le16 size; __u8 flags; __u8 data[0]; -}; +} __packed; struct gb_uart_set_line_coding_request { __le32 rate; @@ -695,7 +695,7 @@ struct gb_uart_set_line_coding_request { #define GB_SERIAL_SPACE_PARITY 4 __u8 data_bits; -}; +} __packed; /* output control lines */ #define GB_UART_CTRL_DTR 0x01 -- 2.20.1