]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: convert some variable sized arrays to [] style
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Jan 2024 23:09:00 +0000 (18:09 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 25 Jan 2024 19:49:07 +0000 (14:49 -0500)
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>
drivers/gpu/drm/amd/include/pptable.h

index 5077c2ce446935d9eac421d97848549340efde63..2e8e6c9875f6c619db989b918811d1c21a8a5b7d 100644 (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