Commit a9c60712 authored by Jakub Kicinski's avatar Jakub Kicinski

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.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 35c9ffba 6c5cdabb
...@@ -242,7 +242,7 @@ struct cxgb4_next_header { ...@@ -242,7 +242,7 @@ struct cxgb4_next_header {
* field's value to jump to next header such as IHL field * field's value to jump to next header such as IHL field
* in IPv4 header. * in IPv4 header.
*/ */
struct tc_u32_sel sel; struct tc_u32_sel_hdr sel;
struct tc_u32_key key; struct tc_u32_key key;
/* location of jump to make */ /* location of jump to make */
const struct cxgb4_match_field *jump; const struct cxgb4_match_field *jump;
......
...@@ -246,16 +246,19 @@ struct tc_u32_key { ...@@ -246,16 +246,19 @@ struct tc_u32_key {
}; };
struct tc_u32_sel { struct tc_u32_sel {
unsigned char flags; /* New members MUST be added within the __struct_group() macro below. */
unsigned char offshift; __struct_group(tc_u32_sel_hdr, hdr, /* no attrs */,
unsigned char nkeys; unsigned char flags;
unsigned char offshift;
__be16 offmask; unsigned char nkeys;
__u16 off;
short offoff; __be16 offmask;
__u16 off;
short hoff; short offoff;
__be32 hmask;
short hoff;
__be32 hmask;
);
struct tc_u32_key keys[]; struct tc_u32_key keys[];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment