drm/amdgpu/atomfirmware: Silence UBSAN warning
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu/atomfirmware: Silence UBSAN warning
Per the comments, these are variable sized arrays.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/include/atomfirmware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/include/atomfirmware.h +2 -2
@@ -1038,7 +1038,7 @@ struct display_object_info_table_v1_4uint16_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[]; };/*
Signature · 1 line
2.46.0
Ping?
Alex
Quoted 34 lines · Alex Deucher
Per the comments, these are variable sized arrays.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/include/atomfirmware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/include/atomfirmware.h +2
-3@@ -1038,7 +1038,7 @@ struct display_object_info_table_v1_4uint16_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
Harry Wentland
Reviewed-byQuoted 10 lines · Alex Deucher
Ping?
Alex
Quoted 5 lines · Alex Deucher
Per the comments, these are variable sized arrays.
Signed-off-by Alex Deucher <[email protected]>
Reviewed-by Harry Wentland <[email protected]>
Harry
Quoted 29 lines
Quoted 29 lines
--- drivers/gpu/drm/amd/include/atomfirmware.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/include/atomfirmware.h +2
-3@@ -1038,7 +1038,7 @@ struct display_object_info_table_v1_4uint16_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