From 18488a64034a06342f1d817f1934c9f3639102b3 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 28 Aug 2024 10:54:00 +0200 Subject: [PATCH] drm/amdgpu/pptable: convert some variable sized arrays to [] style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BugLink: https://bugs.launchpad.net/bugs/2078041 Replace [1] with []. Silences UBSAN warnings. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2039926 Acked-by: Christian König Signed-off-by: Alex Deucher (cherry picked from commit 693d4e8861a53607b9468062f984b7c469840b48) Signed-off-by: Juerg Haefliger Acked-by: Agathe Porte Acked-by: Aaron Jauregui Signed-off-by: Stefan Bader --- drivers/gpu/drm/amd/include/pptable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/include/pptable.h b/drivers/gpu/drm/amd/include/pptable.h index 5aac8d545bdc..5077c2ce4469 100644 --- a/drivers/gpu/drm/amd/include/pptable.h +++ b/drivers/gpu/drm/amd/include/pptable.h @@ -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