]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: typec: ucsi_glink: Update request/response buffers to be packed
authorAnjelique Melendez <anjelique.melendez@oss.qualcomm.com>
Wed, 22 Oct 2025 00:45:53 +0000 (17:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Oct 2025 12:48:34 +0000 (14:48 +0200)
Update the ucsi request/response buffers to be packed to ensure there
are no "holes" in memory while we read/write these structs.

Signed-off-by: Anjelique Melendez <anjelique.melendez@oss.qualcomm.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20251022004554.1956729-2-anjelique.melendez@oss.qualcomm.com
drivers/usb/typec/ucsi/ucsi_glink.c

index 8af79101a2fc75ae17be1d119b25a9c862e010b3..1f9f0d942c1ae605dd506128a10fc9712e160e95 100644 (file)
@@ -30,24 +30,24 @@ struct ucsi_read_buf_req_msg {
        struct pmic_glink_hdr   hdr;
 };
 
-struct ucsi_read_buf_resp_msg {
+struct __packed ucsi_read_buf_resp_msg {
        struct pmic_glink_hdr   hdr;
        u8                      buf[UCSI_BUF_SIZE];
        u32                     ret_code;
 };
 
-struct ucsi_write_buf_req_msg {
+struct __packed ucsi_write_buf_req_msg {
        struct pmic_glink_hdr   hdr;
        u8                      buf[UCSI_BUF_SIZE];
        u32                     reserved;
 };
 
-struct ucsi_write_buf_resp_msg {
+struct __packed ucsi_write_buf_resp_msg {
        struct pmic_glink_hdr   hdr;
        u32                     ret_code;
 };
 
-struct ucsi_notify_ind_msg {
+struct __packed ucsi_notify_ind_msg {
        struct pmic_glink_hdr   hdr;
        u32                     notification;
        u32                     receiver;