[PATCH] cpufreq: use existing local var in cpufreq_statistic_init()

Jan Beulich posted 1 patch 6 months ago
Failed in applying to current master (apply log)
[PATCH] cpufreq: use existing local var in cpufreq_statistic_init()
Posted by Jan Beulich 6 months ago
..., which actually also helps readability (imo).

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/cpufreq/utility.c
+++ b/xen/drivers/cpufreq/utility.c
@@ -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();
Re: [PATCH] cpufreq: use existing local var in cpufreq_statistic_init()
Posted by Andrew Cooper 6 months ago
On 29/04/2025 2:38 pm, Jan Beulich wrote:
> ..., which actually also helps readability (imo).
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>