firmware: arm_scmi: Introduce get_max_msg_size() helper/accessor
authorPeng Fan <peng.fan@nxp.com>
Thu, 18 Apr 2024 01:32:28 +0000 (09:32 +0800)
committerSudeep Holla <sudeep.holla@arm.com>
Fri, 19 Apr 2024 14:17:37 +0000 (15:17 +0100)
commit4869b5cc9641c0cdc100315f324a73f64576ee66
tree593c62d34bd02e08697eace630d793bd06fb80c8
parentfc110108b98305efa24bb8c355e90b5cc2a01a5f
firmware: arm_scmi: Introduce get_max_msg_size() helper/accessor

When the agent is sending data to the SCMI platform, the drivers in the
agent could check the maximum message size supported to avoid potential
protocol buffer overflow.

Introduce the helper/accessor function get_max_msg_size() for the same.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240418-pinctrl-scmi-v11-1-499dca9864a7@nxp.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/driver.c
drivers/firmware/arm_scmi/protocols.h