Re: [PATCH] drm/amdgpu/atomfirmware: Silence UBSAN warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ping?

Alex

On Fri, Sep 6, 2024 at 12:43 PM Alex Deucher <alexander.deucher@xxxxxxx> wrote:
>
> Per the comments, these are variable sized arrays.
>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3613
> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/include/atomfirmware.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/include/atomfirmware.h b/drivers/gpu/drm/amd/include/atomfirmware.h
> index 09cbc3afd6d8..b0fc22383e28 100644
> --- a/drivers/gpu/drm/amd/include/atomfirmware.h
> +++ b/drivers/gpu/drm/amd/include/atomfirmware.h
> @@ -1038,7 +1038,7 @@ struct display_object_info_table_v1_4
>    uint16_t  supporteddevices;
>    uint8_t   number_of_path;
>    uint8_t   reserved;
> -  struct    atom_display_object_path_v2 display_path[8];   //the real number of this included in the structure is calculated by using the (whole structure size - the header size- number_of_path)/size of atom_display_object_path
> +  struct    atom_display_object_path_v2 display_path[];   //the real number of this included in the structure is calculated by using the (whole structure size - the header size- number_of_path)/size of atom_display_object_path
>  };
>
>  struct display_object_info_table_v1_5 {
> @@ -1048,7 +1048,7 @@ struct display_object_info_table_v1_5 {
>         uint8_t reserved;
>         // the real number of this included in the structure is calculated by using the
>         // (whole structure size - the header size- number_of_path)/size of atom_display_object_path
> -       struct atom_display_object_path_v3 display_path[8];
> +       struct atom_display_object_path_v3 display_path[];
>  };
>
>  /*
> --
> 2.46.0
>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux