Replace all fake flexible arrays (i.e. zero-length and one-element arrays) in unions and structs with the
DECLARE_FLEX_ARRAY() helper macro.
In cases where two or more flexible arrays are needed in a structure, all of them should be declared through the DECLARE_FLEX_ARRAY() helper and within a union. See:
Dependent bugs:
Replace all fake flexible arrays (i.e. zero-length and one-element arrays) in unions and structs with the DECLARE_FLEX_ARRAY() helper macro.
In cases where two or more flexible arrays are needed in a structure, all of them should be declared through the DECLARE_FLEX_ARRAY() helper and within a union. See:
All fake flexible arrays in unions should be declared through the DECLARE_FLEX_ARRAY() helper. See:
Any fake flexible array alone in a struct should be declared through the DECLARE_FLEX_ARRAY() helper. See:
For more details and examples: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3080ea5553cc909b000d1f1d964a9041962f2c5b https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fa7845cfd53f3b1d3f60efa55db89805595bc045 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47c662486cccf03e7062139d069b07ab0126ef59