cpufreq: use existing local var in cpufreq_statistic_init()

..., which actually also helps readability (imo).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich committed 2025-04-30 08:47:15 +02:00
1 parent 16d5d2292a
commit c6e0a55396
1 file changed
+3 -3
+3 -3
View File
@@ -130,10 +130,10 @@ int cpufreq_statistic_init(unsigned int cpu)
return -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();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.