]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/nouveau: fence: Avoid -Wflex-array-member-not-at-end warning
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 2 Apr 2025 21:28:10 +0000 (15:28 -0600)
committerDanilo Krummrich <dakr@kernel.org>
Thu, 3 Apr 2025 16:02:18 +0000 (18:02 +0200)
commit1bced6c7f6d31bfaf9189c9903482df01c6d06e7
treeac71ee9804a2ad10060849fe4a2af4bdc7be8017
parente773db73fd24fb8c2b3e0393ed0bbaa4c4a00a5d
drm/nouveau: fence: Avoid -Wflex-array-member-not-at-end warning

-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.

Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
a flexible structure where the size of the flexible-array member
is known at compile-time, and refactor the rest of the code,
accordingly.

So, with these changes, fix the following warning:

drivers/gpu/drm/nouveau/nouveau_fence.c:188:38: 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@kernel.org>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/Z-2r6v-Cji7vwOsz@kspp
drivers/gpu/drm/nouveau/nouveau_fence.c