• Gustavo A. R. Silva's avatar
    platform/chrome: cros_ec_proto: avoid -Wflex-array-member-not-at-end warnings · 41f4bc61
    Gustavo A. R. Silva authored
    Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
    a flexible structure where the size of the flexible-array member
    is known at compile-time, and refactor the rest of the code,
    accordingly.
    
    So, with these changes, fix the following warning:
    drivers/platform/chrome/cros_ec_proto_test.c:1547:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
    drivers/platform/chrome/cros_ec_proto_test.c:1607:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
    drivers/platform/chrome/cros_ec_proto_test.c:1645:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
    drivers/platform/chrome/cros_ec_proto_test.c:1668:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
    
    Link: https://github.com/KSPP/linux/issues/202Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
    Link: https://lore.kernel.org/r/ZgMaDl/of8YC445S@neatSigned-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
    41f4bc61
cros_ec_proto_test.c 82.4 KB