drm/amdgpu: Replace one-element array with flexible-array member
authorPaulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Sat, 29 Oct 2022 01:30:44 +0000 (14:30 +1300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 4 Nov 2022 20:05:53 +0000 (16:05 -0400)
commit320e2590e281d0a7865e861f50155b5b435e9813
treea09dae4217676184e7e1289378aaf8422820430a
parentc81c5bd5cf2f428867e0bcfcccd4e4d2f8c68f51
drm/amdgpu: Replace one-element array with flexible-array member

One-element arrays are deprecated, and we are replacing them with
flexible array members instead. So, replace one-element array with
flexible-array member in struct _ATOM_FAKE_EDID_PATCH_RECORD and
refactor the rest of the code accordingly.

Important to mention is that doing a build before/after this patch
results in no binary output differences.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
routines on memcpy() and help us make progress towards globally
enabling -fstrict-flex-arrays=3 [1].

Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/238
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
drivers/gpu/drm/amd/include/atombios.h