[PATCH] firmware: arm_scmi: imx: Correct tx size of scmi_imx_misc_ctrl_set

Sudeep Holla sudeep.holla at arm.com
Thu Jan 23 04:20:50 PST 2025


On Thu, Jan 23, 2025 at 02:34:41PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan at nxp.com>
> 
> 'struct scmi_imx_misc_ctrl_set_in' has a zero length array in the end,
> so sizeof will not count 'value[]', and txsize is smaller than actual
> size for tx,and SCMI firmware will take this protocol error.
> 
> Fix this by enlarge the txsize with 'num * 4' to count in the size of
> data.
> 
> Fixes: 61c9f03e22fc ("firmware: arm_scmi: Add initial support for i.MX MISC protocol")
> Reviewed-by: Jacky Bai <ping.bai at nxp.com>
> Tested-by: Shengjiu Wang <shengjiu.wang at nxp.com>
> Acked-by: Jason Liu <jason.hui.liu at nxp.com>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> ---
> 
> V1:
>  Patch is cherry-picked from downstream, so tags are kept.
>

I don't if Ack is really helpful, but Tested-by is as we can't test it
on any other platform. But it would be better if provided on the list
instead of coming pre-packaged like this in the future. I will add it
as fix soon. Thanks!

-- 
Regards,
Sudeep



More information about the linux-arm-kernel mailing list