RE: [PATCH][next] iommufd/iommufd_private.h: Avoid -Wflex-array-member-not-at-end warning

From: Tian, Kevin

Date: Mon Nov 17 2025 - 02:14:41 EST


> From: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>
> Sent: Monday, November 10, 2025 7:36 PM
>
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
>
> Move the conflicting declaration to the end of the corresponding
> structure. Notice that struct iommufd_vevent is a flexible
> structure, this is a structure that contains a flexible-array
> member.
>
> Fix the following warning:
>
> drivers/iommu/iommufd/iommufd_private.h:621:31: warning: structure
> containing a flexible array member is not at the end of another structure [-
> Wflex-array-member-not-at-end]
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>