@@ -424,22 +424,22 @@ typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{
424
424
typedef struct _ATOM_PPLIB_STATE_V2
425
425
{
426
426
//number of valid dpm levels in this state; Driver uses it to calculate the whole
427
- //size of the state: sizeof (ATOM_PPLIB_STATE_V2) + ( ucNumDPMLevels - 1) * sizeof(UCHAR )
427
+ //size of the state: struct_size (ATOM_PPLIB_STATE_V2, clockInfoIndex, ucNumDPMLevels)
428
428
UCHAR ucNumDPMLevels ;
429
429
430
430
//a index to the array of nonClockInfos
431
431
UCHAR nonClockInfoIndex ;
432
432
/**
433
433
* Driver will read the first ucNumDPMLevels in this array
434
434
*/
435
- UCHAR clockInfoIndex [1 ] ;
435
+ UCHAR clockInfoIndex [] __counted_by ( ucNumDPMLevels ) ;
436
436
} ATOM_PPLIB_STATE_V2 ;
437
437
438
438
typedef struct _StateArray {
439
439
//how many states we have
440
440
UCHAR ucNumEntries ;
441
441
442
- ATOM_PPLIB_STATE_V2 states [1 ] ;
442
+ ATOM_PPLIB_STATE_V2 states [] __counted_by ( ucNumEntries ) ;
443
443
}StateArray ;
444
444
445
445
@@ -450,7 +450,7 @@ typedef struct _ClockInfoArray{
450
450
//sizeof(ATOM_PPLIB_CLOCK_INFO)
451
451
UCHAR ucEntrySize ;
452
452
453
- UCHAR clockInfo [1 ] ;
453
+ UCHAR clockInfo [] __counted_by ( ucNumEntries ) ;
454
454
}ClockInfoArray ;
455
455
456
456
typedef struct _NonClockInfoArray {
@@ -460,7 +460,7 @@ typedef struct _NonClockInfoArray{
460
460
//sizeof(ATOM_PPLIB_NONCLOCK_INFO)
461
461
UCHAR ucEntrySize ;
462
462
463
- ATOM_PPLIB_NONCLOCK_INFO nonClockInfo [1 ] ;
463
+ ATOM_PPLIB_NONCLOCK_INFO nonClockInfo [] __counted_by ( ucNumEntries ) ;
464
464
}NonClockInfoArray ;
465
465
466
466
typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record
0 commit comments