Skip to contentSkip to conversation

cpufreq: use existing local var in cpufreq_statistic_init()

PATCH In review Jan Beulich 2 participants 2 messages Apr 29, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: use existing local var in cpufreq_statistic_init()

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

xen/drivers/cpufreq/utility.c +3 -3
@@ -130,10 +130,10 @@ int cpufreq_statistic_init(unsigned int
         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();