On 1/3/25 7:45 AM, Alice Guo wrote:
From: Ye Li <[email protected]>

@protocols is an array of protocol identifiers that are implemented,
excluding the Base protocol. The number of elements of @protocols is
specified by callee-side. Currently, set it to 4 is enough for i.MX95.

Signed-off-by: Ye Li <[email protected]>
Signed-off-by: Alice Guo <[email protected]>
---
  include/scmi_protocols.h | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/scmi_protocols.h b/include/scmi_protocols.h
index 
9607433c3276f9aa18044c414a5bde3143726cf4..3c55d228cb641bc6c0e5ca7ac885efe84b41c66d
 100644
--- a/include/scmi_protocols.h
+++ b/include/scmi_protocols.h
@@ -141,11 +141,14 @@ struct scmi_base_discover_impl_version_out {
   * @status:           SCMI command status
   * @num_protocols:    Number of SCMI protocols in @protocol
   * @protocols:                Array of packed SCMI protocol ID's
+ *
+ * The number of elements of @protocols is specified by callee-side. Currently,
+ * set it to 4 is enough for i.MX95.
   */
  struct scmi_base_discover_list_protocols_out {
        s32 status;
        u32 num_protocols;
-       u32 protocols[3];
+       u32 protocols[4];
Can this be made somehow future-proof? For example, figure out how many protocols are supported, and then malloc this structure with the right size and query again ?

Reply via email to