Skip to contentSkip to conversation

drm/radeon: Remove __counted_by from ClockInfoArray.clockInfo[]

PATCH In review Alex Deucher 3 participants 5 messages Dec 17, 2025

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/radeon: Remove __counted_by from ClockInfoArray.clockInfo[]

clockInfo[] is a generic uchar pointer to variable sized structures which vary from ASIC to ASIC.

---
 drivers/gpu/drm/radeon/pptable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/pptable.h +1 -1
index 969a8fb0ee9e0..f4e71046dc91c 100644
@@ -450,7 +450,7 @@ typedef struct _ClockInfoArray{
     //sizeof(ATOM_PPLIB_CLOCK_INFO)
     UCHAR ucEntrySize;
     
-    UCHAR clockInfo[] __counted_by(ucNumEntries);
+    UCHAR clockInfo[] /*__counted_by(ucNumEntries)*/;
 }ClockInfoArray;
 
 typedef struct _NonClockInfoArray{
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Alex Deucher

clockInfo[] is a generic uchar pointer to variable sized structures which vary from ASIC to ASIC.

There is one more -
https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/radeon/pptable.h#L463

Thanks,
Lijo

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 969a8fb0ee9e0..f4e71046dc91c 100644
@@ -450,7 +450,7 @@ typedef struct _ClockInfoArray{
      //sizeof(ATOM_PPLIB_CLOCK_INFO)
      UCHAR ucEntrySize;
 
-    UCHAR clockInfo[] __counted_by(ucNumEntries);
+    UCHAR clockInfo[] /*__counted_by(ucNumEntries)*/;
  }ClockInfoArray;
 
  typedef struct _NonClockInfoArray{
#2 lore raw
Quoted 6 lines · Lijo
Quoted 3 lines · Alex Deucher

clockInfo[] is a generic uchar pointer to variable sized structures which vary from ASIC to ASIC.

Quoted 8 lines
Quoted 2 lines

There is one more -
https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/radeon/ pptable.h#L463

Please ignore. False alarm, has the right datatype.

Thanks,
Lijo

Quoted 19 lines

Thanks,
Lijo

Quoted 15 lines

---
  drivers/gpu/drm/radeon/pptable.h | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/pptable.h +1 -1
index 969a8fb0ee9e0..f4e71046dc91c 100644
@@ -450,7 +450,7 @@ typedef struct _ClockInfoArray{
       //sizeof(ATOM_PPLIB_CLOCK_INFO)
       UCHAR ucEntrySize;
-    UCHAR clockInfo[] __counted_by(ucNumEntries);
+    UCHAR clockInfo[] /*__counted_by(ucNumEntries)*/;
   }ClockInfoArray;
   typedef struct _NonClockInfoArray{
#3 lore raw
Quoted 13 lines · Lijo
Quoted 9 lines · Lijo
Quoted 5 lines · Alex Deucher

clockInfo[] is a generic uchar pointer to variable sized structures which vary from ASIC to ASIC.

Quoted 8 lines
Quoted 6 lines

There is one more -
https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/radeon/
pptable.h#L463

Please ignore. False alarm, has the right datatype.

Right. Thanks!

Quoted 25 lines

Thanks,
Lijo

Quoted 20 lines

Thanks,
Lijo

Quoted 16 lines
---
  drivers/gpu/drm/radeon/pptable.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ renamed from drivers/gpu/drm/radeon/pptable.h +0 -0

radeon/pptable.h
index 969a8fb0ee9e0..f4e71046dc91c 100644

drivers/gpu/drm/radeon/pptable.h +1 -1
@@ -450,7 +450,7 @@ typedef struct _ClockInfoArray{
      //sizeof(ATOM_PPLIB_CLOCK_INFO)
      UCHAR ucEntrySize;
-    UCHAR clockInfo[] __counted_by(ucNumEntries);
+    UCHAR clockInfo[] /*__counted_by(ucNumEntries)*/;
  }ClockInfoArray;
  typedef struct _NonClockInfoArray{
#4 lore raw
In reply to Lazar, Lijo
Quoted 7 lines · Lijo
Quoted 3 lines · Alex Deucher

clockInfo[] is a generic uchar pointer to variable sized structures which vary from ASIC to ASIC.

Quoted 7 lines
Quoted 2 lines

There is one more -
https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/radeon/pptable.h#L463

Thanks, I'll squash that one in too.

Alex

Quoted 22 lines

Thanks,
Lijo

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 969a8fb0ee9e0..f4e71046dc91c 100644
@@ -450,7 +450,7 @@ typedef struct _ClockInfoArray{
      //sizeof(ATOM_PPLIB_CLOCK_INFO)
      UCHAR ucEntrySize;
 
-    UCHAR clockInfo[] __counted_by(ucNumEntries);
+    UCHAR clockInfo[] /*__counted_by(ucNumEntries)*/;
  }ClockInfoArray;
 
  typedef struct _NonClockInfoArray{