diff options
author | Gustavo A. R. Silva <[email protected]> | 2023-05-15 13:23:46 -0600 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2023-05-17 21:24:37 -0700 |
commit | fe6559fab328972a2c8687d322fa54ab6d08f209 (patch) | |
tree | cd13728b23d458d044fdef147f0e9b08dceb3307 | |
parent | af2eab1a824349cfb0f6a720ad06eea48e9e6b74 (diff) |
net: libwx: Replace zero-length array with flexible-array member
Zero-length arrays as fake flexible arrays are deprecated, and we are
moving towards adopting C99 flexible-array members instead.
Transform zero-length array into flexible-array member in struct
wx_q_vector.
Link: https://github.com/KSPP/linux/issues/21
Link: https://github.com/KSPP/linux/issues/286
Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/ZGKGwtsobVZecWa4@work
Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r-- | drivers/net/ethernet/wangxun/libwx/wx_type.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_type.h b/drivers/net/ethernet/wangxun/libwx/wx_type.h index 32f952d93009..cbe7f184b50e 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_type.h +++ b/drivers/net/ethernet/wangxun/libwx/wx_type.h @@ -598,7 +598,7 @@ struct wx_q_vector { char name[IFNAMSIZ + 17]; /* for dynamic allocation of rings associated with this q_vector */ - struct wx_ring ring[0] ____cacheline_internodealigned_in_smp; + struct wx_ring ring[] ____cacheline_internodealigned_in_smp; }; enum wx_isb_idx { |