Re: [PATCH v2] scsi: fc: Avoid -Wflex-array-member-not-at-end warnings

From: Martin K. Petersen
Date: Sat Aug 30 2025 - 21:43:41 EST



Gustavo,

> -Wflex-array-member-not-at-end has been introduced in GCC-14, and we
> are getting ready to enable it, globally.
>
> So, in order to avoid ending up with a flexible-array member in the
> middle of multiple other structs, we use the `__struct_group()` helper
> to create a new tagged `struct fc_df_desc_fpin_reg_hdr`. This
> structure groups together all the members of the flexible `struct
> fc_df_desc_fpin_reg` except the flexible array.

Applied to 6.18/scsi-staging, thanks!

--
Martin K. Petersen