[PATCH] drm/amdgpu: silence UBSAN warning

Alex Deucher alexdeucher at gmail.com
Thu May 23 18:44:47 UTC 2024


Ping?

On Thu, May 16, 2024 at 10:32 AM Alex Deucher <alexander.deucher at amd.com> wrote:
>
> Convert a variable sized array from [1] to [].
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  drivers/gpu/drm/amd/include/atomfirmware.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/include/atomfirmware.h b/drivers/gpu/drm/amd/include/atomfirmware.h
> index af3eebb4c9bcb..f732182218330 100644
> --- a/drivers/gpu/drm/amd/include/atomfirmware.h
> +++ b/drivers/gpu/drm/amd/include/atomfirmware.h
> @@ -3540,7 +3540,7 @@ struct atom_gpio_voltage_object_v4
>     uint8_t  phase_delay_us;                      // phase delay in unit of micro second
>     uint8_t  reserved;
>     uint32_t gpio_mask_val;                         // GPIO Mask value
> -   struct atom_voltage_gpio_map_lut voltage_gpio_lut[1];
> +   struct atom_voltage_gpio_map_lut voltage_gpio_lut[] __counted_by(gpio_entry_num);
>  };
>
>  struct  atom_svid2_voltage_object_v4
> --
> 2.45.0
>


More information about the amd-gfx mailing list