Merge branch 'uapi-net-sched-cxgb4-fix-wflex-array-member-not-at-end-warning'

Gustavo A. R. Silva says:

====================
UAPI: net/sched - cxgb4: Fix -Wflex-array-member-not-at-end warning

Small patch series aimed at fixing a -Wflex-array-member-not-at-end
warning by creating a new tagged struct within a flexible structure.
We then use this new struct type to fix a problematic middle-flex-array
declaration in a composite struct.
====================

Link: https://patch.msgid.link/cover.1723586870.git.gustavoars@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2024-08-14 20:37:49 -07:00
commit a9c60712d7
2 changed files with 12 additions and 9 deletions

View File

@ -242,7 +242,7 @@ struct cxgb4_next_header {
* field's value to jump to next header such as IHL field
* in IPv4 header.
*/
struct tc_u32_sel sel;
struct tc_u32_sel_hdr sel;
struct tc_u32_key key;
/* location of jump to make */
const struct cxgb4_match_field *jump;

View File

@ -246,16 +246,19 @@ struct tc_u32_key {
};
struct tc_u32_sel {
unsigned char flags;
unsigned char offshift;
unsigned char nkeys;
/* New members MUST be added within the __struct_group() macro below. */
__struct_group(tc_u32_sel_hdr, hdr, /* no attrs */,
unsigned char flags;
unsigned char offshift;
unsigned char nkeys;
__be16 offmask;
__u16 off;
short offoff;
__be16 offmask;
__u16 off;
short offoff;
short hoff;
__be32 hmask;
short hoff;
__be32 hmask;
);
struct tc_u32_key keys[];
};