@@ -861,8 +861,8 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
861
861
862
862
for (i = 0 ; i < NumberOfProcessors ; i ++ )
863
863
{
864
- stateDistribution = ( PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION ) PTR_ADD_OFFSET (CurrentPerformanceDistribution , CurrentPerformanceDistribution -> Offsets [i ]);
865
- stateDifference = ( PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION ) PTR_ADD_OFFSET (differences , stateSize * i );
864
+ stateDistribution = PTR_ADD_OFFSET (CurrentPerformanceDistribution , CurrentPerformanceDistribution -> Offsets [i ]);
865
+ stateDifference = PTR_ADD_OFFSET (differences , stateSize * i );
866
866
867
867
if (stateDistribution -> StateCount != 2 )
868
868
{
@@ -878,7 +878,7 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
878
878
}
879
879
else
880
880
{
881
- hitcountOld = ( PSYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8 ) PTR_ADD_OFFSET (stateDistribution -> States , sizeof (SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8 ) * j );
881
+ hitcountOld = PTR_ADD_OFFSET (stateDistribution -> States , sizeof (SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8 ) * j );
882
882
stateDifference -> States [j ].Hits = hitcountOld -> Hits ;
883
883
stateDifference -> States [j ].PercentFrequency = hitcountOld -> PercentFrequency ;
884
884
}
@@ -887,8 +887,8 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
887
887
888
888
for (i = 0 ; i < NumberOfProcessors ; i ++ )
889
889
{
890
- stateDistribution = ( PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION ) PTR_ADD_OFFSET (PreviousPerformanceDistribution , PreviousPerformanceDistribution -> Offsets [i ]);
891
- stateDifference = ( PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION ) PTR_ADD_OFFSET (differences , stateSize * i );
890
+ stateDistribution = PTR_ADD_OFFSET (PreviousPerformanceDistribution , PreviousPerformanceDistribution -> Offsets [i ]);
891
+ stateDifference = PTR_ADD_OFFSET (differences , stateSize * i );
892
892
893
893
if (stateDistribution -> StateCount != 2 )
894
894
{
@@ -904,7 +904,7 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
904
904
}
905
905
else
906
906
{
907
- hitcountOld = ( PSYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8 ) PTR_ADD_OFFSET (stateDistribution -> States , sizeof (SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8 ) * j );
907
+ hitcountOld = PTR_ADD_OFFSET (stateDistribution -> States , sizeof (SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8 ) * j );
908
908
stateDifference -> States [j ].Hits -= hitcountOld -> Hits ;
909
909
}
910
910
}
@@ -917,7 +917,7 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
917
917
918
918
for (i = 0 ; i < NumberOfProcessors ; i ++ )
919
919
{
920
- stateDifference = ( PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION ) PTR_ADD_OFFSET (differences , stateSize * i );
920
+ stateDifference = PTR_ADD_OFFSET (differences , stateSize * i );
921
921
922
922
for (j = 0 ; j < 2 ; j ++ )
923
923
{
0 commit comments