drm/amdgpu/pptable: convert some variable sized arrays to [] style
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Jan 2024 15:48:39 +0000 (10:48 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 25 Jan 2024 19:46:46 +0000 (14:46 -0500)
Replace [1] with [].  Silences UBSAN warnings.

Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2039926
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/include/pptable.h

index 5aac8d5..5077c2c 100644 (file)
@@ -658,7 +658,7 @@ typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Record
 
 typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Table{
     UCHAR numEntries;
-    ATOM_PPLIB_SAMClk_Voltage_Limit_Record entries[1];
+    ATOM_PPLIB_SAMClk_Voltage_Limit_Record entries[];
 }ATOM_PPLIB_SAMClk_Voltage_Limit_Table;
 
 typedef struct _ATOM_PPLIB_SAMU_Table