AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: silence UBSAN warning
@ 2024-05-16 13:55 Alex Deucher
  2024-05-23 18:44 ` Alex Deucher
  2024-05-24  8:07 ` Christian König
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Deucher @ 2024-05-16 13:55 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher

Convert a variable sized array from [1] to [].

Signed-off-by: Alex Deucher <alexander.deucher@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 af3eebb4c9bcb..f732182218330 100644
--- a/drivers/gpu/drm/amd/include/atomfirmware.h
+++ b/drivers/gpu/drm/amd/include/atomfirmware.h
@@ -3540,7 +3540,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
-- 
2.45.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: silence UBSAN warning
  2024-05-16 13:55 [PATCH] drm/amdgpu: silence UBSAN warning Alex Deucher
@ 2024-05-23 18:44 ` Alex Deucher
  2024-05-24  8:07 ` Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2024-05-23 18:44 UTC (permalink / raw)
  To: Alex Deucher; +Cc: amd-gfx

Ping?

On Thu, May 16, 2024 at 10:32 AM Alex Deucher <alexander.deucher@amd.com> wrote:
>
> Convert a variable sized array from [1] to [].
>
> Signed-off-by: Alex Deucher <alexander.deucher@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 af3eebb4c9bcb..f732182218330 100644
> --- a/drivers/gpu/drm/amd/include/atomfirmware.h
> +++ b/drivers/gpu/drm/amd/include/atomfirmware.h
> @@ -3540,7 +3540,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
> --
> 2.45.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: silence UBSAN warning
  2024-05-16 13:55 [PATCH] drm/amdgpu: silence UBSAN warning Alex Deucher
  2024-05-23 18:44 ` Alex Deucher
@ 2024-05-24  8:07 ` Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2024-05-24  8:07 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx

Am 16.05.24 um 15:55 schrieb Alex Deucher:
> Convert a variable sized array from [1] to [].
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Christian König <christian.koenig@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 af3eebb4c9bcb..f732182218330 100644
> --- a/drivers/gpu/drm/amd/include/atomfirmware.h
> +++ b/drivers/gpu/drm/amd/include/atomfirmware.h
> @@ -3540,7 +3540,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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-24  8:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 13:55 [PATCH] drm/amdgpu: silence UBSAN warning Alex Deucher
2024-05-23 18:44 ` Alex Deucher
2024-05-24  8:07 ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox