Commit 829a91e7 authored by Viresh Kumar's avatar Viresh Kumar Committed by Johan Hovold

greybus: greybus_protocols: Pack structure as required by the module firmware

These structures are expected to be packed by the module firmware code,
but the kernel wasn't following it until now.

Its all working currently because compiler doesn't add any pad bytes for
these structures, as their elements are already aligned to their size.

But these structures can change in future and we better mark them
packed.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
parent d6ec7872
......@@ -172,27 +172,27 @@ struct gb_control_disconnected_request {
/* Firmware protocol firmware size request/response */
struct gb_firmware_size_request {
__u8 stage;
};
} __packed;
struct gb_firmware_size_response {
__le32 size;
};
} __packed;
/* Firmware protocol get firmware request/response */
struct gb_firmware_get_firmware_request {
__le32 offset;
__le32 size;
};
} __packed;
struct gb_firmware_get_firmware_response {
__u8 data[0];
};
} __packed;
/* Firmware protocol Ready to boot request */
struct gb_firmware_ready_to_boot_request {
__u8 stage;
__u8 status;
};
} __packed;
/* Firmware protocol Ready to boot response has no payload */
......@@ -756,7 +756,7 @@ struct gb_svc_hello_request {
struct gb_svc_intf_device_id_request {
__u8 intf_id;
__u8 device_id;
};
} __packed;
/* device id response has no payload */
struct gb_svc_intf_hotplug_request {
......@@ -772,12 +772,12 @@ struct gb_svc_intf_hotplug_request {
struct gb_svc_intf_hot_unplug_request {
__u8 intf_id;
};
} __packed;
/* hot unplug response has no payload */
struct gb_svc_intf_reset_request {
__u8 intf_id;
};
} __packed;
/* interface reset response has no payload */
struct gb_svc_conn_create_request {
......@@ -803,7 +803,7 @@ struct gb_svc_route_create_request {
__u8 dev1_id;
__u8 intf2_id;
__u8 dev2_id;
};
} __packed;
/* route create response has no payload */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment