Skip to content

Commit 17ea438

Browse files
committed
drm/amdgpu/atomfirmware: Silence UBSAN warning
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 81f7804) Cc: stable@vger.kernel.org
1 parent 8409fb5 commit 17ea438

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/include/atomfirmware.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ struct display_object_info_table_v1_4
10381038
uint16_t supporteddevices;
10391039
uint8_t number_of_path;
10401040
uint8_t reserved;
1041-
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
1041+
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
10421042
};
10431043

10441044
struct display_object_info_table_v1_5 {
@@ -1048,7 +1048,7 @@ struct display_object_info_table_v1_5 {
10481048
uint8_t reserved;
10491049
// the real number of this included in the structure is calculated by using the
10501050
// (whole structure size - the header size- number_of_path)/size of atom_display_object_path
1051-
struct atom_display_object_path_v3 display_path[8];
1051+
struct atom_display_object_path_v3 display_path[];
10521052
};
10531053

10541054
/*

0 commit comments

Comments
 (0)