drm/amdgpu: silence UBSAN warning
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 16 May 2024 13:51:26 +0000 (09:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 May 2024 21:02:41 +0000 (17:02 -0400)
Convert a variable sized array from [1] to [].

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/include/atomfirmware.h

index 1acb2d2c5597b53d556a8690c7b5b851229bbd0a..5716918372001a394967b3dcf620e623f65e9467 100644 (file)
@@ -3583,7 +3583,7 @@ struct atom_gpio_voltage_object_v4
    uint8_t  phase_delay_us;                      // phase delay in unit of micro second
    uint8_t  reserved;   
    uint32_t gpio_mask_val;                         // GPIO Mask value
-   struct atom_voltage_gpio_map_lut voltage_gpio_lut[1];
+   struct atom_voltage_gpio_map_lut voltage_gpio_lut[] __counted_by(gpio_entry_num);
 };
 
 struct  atom_svid2_voltage_object_v4