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

Lazar, Lijo lijo.lazar at amd.com
Tue Jan 23 09:14:24 UTC 2024



On 1/22/2024 8:30 PM, Alex Deucher wrote:
> Replace [1] with [].  Silences UBSAN warnings.
> 
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3107
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

typo => covert-> convert

With the typo fixed in the subject -
	Reviewed-by: Lijo Lazar <lijo.lazar at amd.com>

Thanks,
Lijo

> ---
>  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 5aac8d545bdc..ef3feb0b6674 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


More information about the amd-gfx mailing list