drm/amdgpu: convert some variable sized arrays to [] style

BugLink: https://bugs.launchpad.net/bugs/2078041

Replace [1] with [].  Silences UBSAN warnings.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3107
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

(cherry picked from commit 4953be13bebb3e6c9dffcfe0714de553155cac90)
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Agathe Porte <agathe.porte@canonical.com>
Acked-by: Aaron Jauregui <aaron.jauregui@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
This commit is contained in:
Alex Deucher
2024-08-28 10:54:00 +02:00
committed by Stefan Bader
parent 18488a6403
commit 1d1e19b51e
+2 -2
View File
@@ -491,7 +491,7 @@ typedef struct _ClockInfoArray{
//sizeof(ATOM_PPLIB_CLOCK_INFO)
UCHAR ucEntrySize;
UCHAR clockInfo[1];
UCHAR clockInfo[];
}ClockInfoArray;
typedef struct _NonClockInfoArray{
@@ -501,7 +501,7 @@ typedef struct _NonClockInfoArray{
//sizeof(ATOM_PPLIB_NONCLOCK_INFO)
UCHAR ucEntrySize;
ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1];
ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[];
}NonClockInfoArray;
typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record