Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+12 -9
+1 -1
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h
··· 242 242 * field's value to jump to next header such as IHL field 243 243 * in IPv4 header. 244 244 */ 245 - struct tc_u32_sel sel; 245 + struct tc_u32_sel_hdr sel; 246 246 struct tc_u32_key key; 247 247 /* location of jump to make */ 248 248 const struct cxgb4_match_field *jump;
+11 -8
include/uapi/linux/pkt_cls.h
··· 246 246 }; 247 247 248 248 struct tc_u32_sel { 249 - unsigned char flags; 250 - unsigned char offshift; 251 - unsigned char nkeys; 249 + /* New members MUST be added within the __struct_group() macro below. */ 250 + __struct_group(tc_u32_sel_hdr, hdr, /* no attrs */, 251 + unsigned char flags; 252 + unsigned char offshift; 253 + unsigned char nkeys; 252 254 253 - __be16 offmask; 254 - __u16 off; 255 - short offoff; 255 + __be16 offmask; 256 + __u16 off; 257 + short offoff; 256 258 257 - short hoff; 258 - __be32 hmask; 259 + short hoff; 260 + __be32 hmask; 261 + ); 259 262 struct tc_u32_key keys[]; 260 263 }; 261 264