From 1d1e19b51e9850c9167e50f5d540616554bb9a86 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 28 Aug 2024 10:54:00 +0200 Subject: [PATCH] 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 Signed-off-by: Alex Deucher (cherry picked from commit 4953be13bebb3e6c9dffcfe0714de553155cac90) 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/include/pptable.h b/drivers/gpu/drm/amd/include/pptable.h index 5077c2ce4469..2e8e6c9875f6 100644 --- a/drivers/gpu/drm/amd/include/pptable.h +++ b/drivers/gpu/drm/amd/include/pptable.h @@ -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