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

Christian König ckoenig.leichtzumerken at gmail.com
Mon Jan 22 18:39:19 UTC 2024


Am 22.01.24 um 17:00 schrieb Alex Deucher:
> Replace [1] with [].  Silences UBSAN warnings.
>
> Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2039926
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

Acked-by: Christian König <christian.koenig at amd.com>

> ---
>   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 ef3feb0b6674..2e8e6c9875f6 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



More information about the amd-gfx mailing list