]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amdgpu/atomfirmware: Silence UBSAN warning
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Sep 2024 14:42:45 +0000 (10:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Sep 2024 21:27:17 +0000 (17:27 -0400)
Per the comments, these are variable sized arrays.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3613
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 81f7804ba84ee617ed594de934ed87bcc4f83531)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/include/atomfirmware.h

index 09cbc3afd6d89d815aeb212f38ddb4edaa6e91fa..b0fc22383e2874191660b8b3f4eeed6cb7372077 100644 (file)
@@ -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[];
 };
 
 /*