drm/radeon: make -fstrict-flex-arrays=3 happy
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Apr 2024 02:06:08 +0000 (22:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Apr 2024 02:39:16 +0000 (22:39 -0400)
commit69c0f070531cc9136576c53a6fc27992b88088ea
tree097ae48c20660426fc1beff1b91a538f903f5540
parent0c1195ca0d02a3db2599738a944bb6a36f6fa234
drm/radeon: make -fstrict-flex-arrays=3 happy

The driver parses a union where the layout up through the first
array is the same, however, the array has different sizes
depending on the elements in the union.  Be explicit to
fix the UBSAN checker.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3323
Fixes: df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3")
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Kees Cook <keescook@chromium.org>
drivers/gpu/drm/radeon/radeon_atombios.c