Subject: Re: [PATCH 1/4] firmware: arm_scmi: Read sensor config as 32-bit value

From: Cristian Marussi <[email-masked]>
Date: Tue, 19 May 2026 09:38:03 +0100

On Sun, May 17, 2026 at 08:02:40PM +0100, Sudeep Holla wrote:
> The SENSOR_CONFIG_GET response contains a 32-bit sensor_config field,
> and the xfer is initialized with a 4-byte RX buffer. Reading it with
> get_unaligned_le64() can consume bytes past the returned payload.
> 
> Use get_unaligned_le32() to match the protocol layout and the allocated
> response size.
> 
> Fixes: 7b83c5f41088 ("firmware: arm_scmi: Add SCMI v3.0 sensor configuration support")
> Signed-off-by: Sudeep Holla <[email-masked]>
> ---
>  drivers/firmware/arm_scmi/sensors.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/arm_scmi/sensors.c b/drivers/firmware/arm_scmi/sensors.c
> index 882d55f987d2..836c294a9f42 100644
> --- a/drivers/firmware/arm_scmi/sensors.c
> +++ b/drivers/firmware/arm_scmi/sensors.c
> @@ -793,7 +793,7 @@ static int scmi_sensor_config_get(const struct scmi_protocol_handle *ph,
>  	if (!ret) {
>  		struct scmi_sensor_info *s = si->sensors + sensor_id;
>  
> -		*sensor_config = get_unaligned_le64(t->rx.buf);
> +		*sensor_config = get_unaligned_le32(t->rx.buf);
>  		s->sensor_config = *sensor_config;
>  	}

Reviewed-by: Cristian Marussi <[email-masked]>

Thanks,
Cristian