mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Anjelique Melendez <anjelique.melendez@oss.qualcomm.com>
Cc: gregkh@linuxfoundation.org, lumag@kernel.org,
	neil.armstrong@linaro.org, johan+linaro@kernel.org,
	quic_bjorande@quicinc.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v3 1/2] usb: typec: ucsi_glink: Update request/response buffers to be packed
Date: Thu, 28 Aug 2025 13:16:24 +0300	[thread overview]
Message-ID: <aLAseOzr9_s0_lOv@kuha.fi.intel.com> (raw)
In-Reply-To: <20250827201241.3111857-2-anjelique.melendez@oss.qualcomm.com>

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@oss.qualcomm.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.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

  reply	other threads:[~2025-08-28 10:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27 20:12 [PATCH v3 0/2] usb: typec: ucsi_glink: Add support UCSI v2 Anjelique Melendez
2025-08-27 20:12 ` [PATCH v3 1/2] usb: typec: ucsi_glink: Update request/response buffers to be packed Anjelique Melendez
2025-08-28 10:16   ` Heikki Krogerus [this message]
2025-08-27 20:12 ` [PATCH v3 2/2] usb: typec: ucsi_glink: Increase buffer size to support UCSI v2 Anjelique Melendez
2025-08-28 11:05   ` Heikki Krogerus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aLAseOzr9_s0_lOv@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=anjelique.melendez@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan+linaro@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_bjorande@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®