]> xenbits.xensource.com Git - xen.git/commitdiff
cpufreq: use existing local var in cpufreq_statistic_init()
authorJan Beulich <jbeulich@suse.com>
Wed, 30 Apr 2025 06:47:15 +0000 (08:47 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 30 Apr 2025 06:47:15 +0000 (08:47 +0200)
..., which actually also helps readability (imo).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/cpufreq/utility.c

index e690a484f18f619a194154f26809c60fbec5902d..ac2889d496d40ecdaf95f89c635d1fc41c921c16 100644 (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();