[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aLAseOzr9_s0_lOv@kuha.fi.intel.com>
Date: Thu, 28 Aug 2025 13:16:24 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Anjelique Melendez <anjelique.melendez@....qualcomm.com>
Cc: gregkh@...uxfoundation.org, lumag@...nel.org, neil.armstrong@...aro.org,
johan+linaro@...nel.org, quic_bjorande@...cinc.com,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v3 1/2] usb: typec: ucsi_glink: Update request/response
buffers to be packed
On Wed, Aug 27, 2025 at 01:12:40PM -0700, Anjelique Melendez wrote:
> 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@....qualcomm.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
> ---
> drivers/usb/typec/ucsi/ucsi_glink.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
> index 8af79101a2fc..1f9f0d942c1a 100644
> --- a/drivers/usb/typec/ucsi/ucsi_glink.c
> +++ b/drivers/usb/typec/ucsi/ucsi_glink.c
> @@ -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;
> --
> 2.34.1
--
heikki
Powered by blists - more mailing lists