cpufreq: use existing local var in cpufreq_statistic_init()
PATCH 1/1 cpufreq: use existing local var in cpufreq_statistic_init()
..., which actually also helps readability (imo).
Signed-off-by Jan Beulich <[email protected]>
xen/drivers/cpufreq/utility.c +3 -3
@@ -130,10 +130,10 @@ int cpufreq_statistic_init(unsigned intreturn -ENOMEM ; } - pxpt->u.total = pmpt->perf.state_count; - pxpt->u.usable = pmpt->perf.state_count - pmpt->perf.platform_limit; + pxpt->u.total = count; + pxpt->u.usable = count - pmpt->perf.platform_limit; -for (i=0 ; i < pmpt->perf.state_count; i++) +for ( i =0 ; i < count; i++ ) pxpt->u.pt[i].freq = pmpt->perf.states[i].core_frequency; pxpt->prev_state_wall =NOW ();
Quoted 3 lines · Jan Beulich
..., which actually also helps readability (imo).
Signed-off-by Jan Beulich <[email protected]>
Acked-by Andrew Cooper <[email protected]>