soc: qcom: smd-rpm: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
Subsystems (2)
PATCH 1/1 soc: qcom: smd-rpm: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new DECLARE_FLEX_ARRAY() helper macro.
This helper allows for flexible-array members in unions.
--- drivers/soc/qcom/smd-rpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/smd-rpm.c +1 -1
@@ -75,7 +75,7 @@ struct qcom_rpm_message {__le32 length;union {__le32 msg_id; -u8 message[0 ]; + DECLARE_FLEX_ARRAY(u8, message); }; };
Signature · 1 line
2.34.1
Quoted 10 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members in unions.
Signature · 1 line
Kees Cook
Quoted 8 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members in unions.
[...]
Applied, thanks!
[1/1] soc: qcom: smd-rpm: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
commit: 1e9dd807c609d1598fa56a1d65074a6eeb89f705
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>