net/fungible: Avoid -Wflex-array-member-not-at-end warning
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 5 Aug 2024 15:30:26 +0000 (09:30 -0600)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Aug 2024 03:00:01 +0000 (20:00 -0700)
commit3f49edf44bd660d393b68a2b1d77a0841fb7f21d
treea14ea7695e6377ad8e68f07de25ffc358b8a2ad3
parente66f33bdf0c3adda068b1e2c70c768c56166b58a
net/fungible: Avoid -Wflex-array-member-not-at-end warning

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/net/ethernet/fungible/funcore/fun_dev.c:550:43: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://patch.msgid.link/ZrDwEugW7DR/FlP5@cute
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/fungible/funcore/fun_dev.c