[PATCH] drm/amdgpu/atomfirmware: silence UBSAN warning

SHANMUGAM, SRINIVASAN SRINIVASAN.SHANMUGAM at amd.com
Wed Jul 3 12:59:41 UTC 2024


[Public]

Acked-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Monday, July 1, 2024 10:25 PM
To: amd-gfx at lists.freedesktop.org; jlayton at kernel.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH] drm/amdgpu/atomfirmware: silence UBSAN warning

This is a variably sized array.

Link: https://lists.freedesktop.org/archives/amd-gfx/2024-June/110420.html
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/include/atomfirmware.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/include/atomfirmware.h b/drivers/gpu/drm/amd/include/atomfirmware.h
index 571691837200..09cbc3afd6d8 100644
--- a/drivers/gpu/drm/amd/include/atomfirmware.h
+++ b/drivers/gpu/drm/amd/include/atomfirmware.h
@@ -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



More information about the amd-gfx mailing list