On 5/24/2022 4:33 AM, viktor.barna@xxxxxxxxxx wrote: [snip]
+/* Message structure. */ +struct cl_fw_msg { + __le16 msg_id; /* Message ID. */ + u8 dst_kern_id; /* Destination kernel ID. */ + u8 dst_task_id; /* Destination task ID. */ + u8 src_kern_id; /* Source kernel ID. */ + u8 src_task_id; /* Source task ID. */ + __le16 param_len; /* Parameter embedded struct length. */ + __le32 param[1]; /* Parameter embedded struct - must be word-aligned. */
use of [1] is deprecated and this usage will potentially break with upcoming "fortify source" kernel changes
see <https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays>
when you change to use just [] make sure that any code that uses sizeof(the current struct) is modified to account for the removal of one __le32 from the struct