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

From: Sudeep Holla
Date: Thu Jan 23 2025 - 07:21:04 EST


On Thu, Jan 23, 2025 at 02:34:41PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@xxxxxxx>
>
> '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@xxxxxxx>
> Tested-by: Shengjiu Wang <shengjiu.wang@xxxxxxx>
> Acked-by: Jason Liu <jason.hui.liu@xxxxxxx>
> Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
> ---
>
> 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