drm/amdgpu/atomfirmware: silence UBSAN warning
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu/atomfirmware: silence UBSAN warning
This is a variably sized array.
--- drivers/gpu/drm/amd/include/atomfirmware.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/include/atomfirmware.h +1 -1
@@ -734,7 +734,7 @@ struct atom_gpio_pin_lut_v2_1 {struct atom_common_table_header table_header;/*the real number of this included in the structure is calcualted by using the (whole structure size - the header size)/size of atom_gpio_pin_lut */ -struct atom_gpio_pin_assignment gpio_pin[8 ]; +struct atom_gpio_pin_assignment gpio_pin[]; };
Signature · 1 line
2.45.2
Quoted 18 lines · Alex Deucher
This is a variably sized array.
Link:
https://lists.freedesktop.org/archives/amd-gfx/2024-June/110420.htmlSigned-off-by Alex Deucher <[email protected]>---
drivers/gpu/drm/amd/include/atomfirmware.h | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/include/atomfirmware.h +0
-0@@ -734,7 +734,7 @@ struct atom_gpio_pin_lut_v2_1 { struct atom_common_table_header table_header; /*the real number of this included in the structure is calcualted
Quoted 7 lines
by using the (whole structure size - the header size)/size of atom_gpio_pin_lut */
- struct atom_gpio_pin_assignment gpio_pin[8];
+ struct atom_gpio_pin_assignment gpio_pin[];
};
Works for me:
[Public]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, July 1, 2024 10:25 PM
To: [email protected]; [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/atomfirmware: silence UBSAN warning
This is a variably sized array.
--- drivers/gpu/drm/amd/include/atomfirmware.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/include/atomfirmware.h +1 -2
@@ -734,7 +734,7 @@ struct atom_gpio_pin_lut_v2_1 {struct atom_common_table_header table_header;/*the real number of this included in the structure is calcualted by using the (whole structure size - the header size)/size of atom_gpio_pin_lut */ -struct atom_gpio_pin_assignment gpio_pin[8 ]; +struct atom_gpio_pin_assignment gpio_pin[]; }; --
2.45.2