Skip to contentSkip to conversation

drm/radeon: silence UBSAN warning

PATCH In review Alex Deucher 2 participants 2 messages Mar 23, 2024 – Apr 4, 2024

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/radeon: silence UBSAN warning

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

---
 drivers/gpu/drm/radeon/pptable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/pptable.h +1 -1
index 94947229888b..a7f9553b648b 100644
@@ -432,7 +432,7 @@ typedef struct _ATOM_PPLIB_STATE_V2
       /**
       * Driver will read the first ucNumDPMLevels in this array
       */
-      UCHAR clockInfoIndex[1];
+      UCHAR clockInfoIndex[];
 } ATOM_PPLIB_STATE_V2;
 
 typedef struct _StateArray{
Signature · 1 line
2.44.0
Acked-by on v1 1/1
#1 lore raw

Am 23.03.24 um 22:39 schrieb Alex Deucher:

Quoted 3 lines

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

Quoted 17 lines
---
  drivers/gpu/drm/radeon/pptable.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/pptable.h +1 -1
index 94947229888b..a7f9553b648b 100644
@@ -432,7 +432,7 @@ typedef struct _ATOM_PPLIB_STATE_V2
        /**
        * Driver will read the first ucNumDPMLevels in this array
        */
-      UCHAR clockInfoIndex[1];
+      UCHAR clockInfoIndex[];
  } ATOM_PPLIB_STATE_V2;
 
  typedef struct _StateArray{