]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/nouveau: disp: Avoid -Wflex-array-member-not-at-end warning
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 2 Apr 2025 21:58:59 +0000 (15:58 -0600)
committerDanilo Krummrich <dakr@kernel.org>
Thu, 3 Apr 2025 16:02:18 +0000 (18:02 +0200)
commit446d38554dc43e8391441fb3413512ba87a88583
treebb2a8c329f96182f8346997d22c18a6a10058d6d
parente876bfecbd10491dfa50653b13791582285b2482
drm/nouveau: disp: 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/dispnv50/disp.c:779:47: 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-2zI55Qf88jTfNK@kspp
drivers/gpu/drm/nouveau/dispnv50/disp.c