greybus: uart: fix message packing
authorJohan Hovold <johan@hovoldconsulting.com>
Sat, 1 Aug 2015 09:50:39 +0000 (11:50 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 4 Aug 2015 03:00:41 +0000 (20:00 -0700)
Add missing packed attributes to prevent implicit structure padding.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_protocols.h

index 121300a84e1ce242d5351c2b67f2739d17a6b332..cdd5b54874bdbbed7ba8cfaf205c6c724d2c5d01 100644 (file)
@@ -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