[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



commit c6e0a55396233bd7de6646a9b9be8d7c59950648
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Apr 30 08:47:15 2025 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Apr 30 08:47:15 2025 +0200

    cpufreq: use existing local var in cpufreq_statistic_init()
    
    ..., which actually also helps readability (imo).
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/drivers/cpufreq/utility.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/cpufreq/utility.c b/xen/drivers/cpufreq/utility.c
index e690a484f1..ac2889d496 100644
--- a/xen/drivers/cpufreq/utility.c
+++ b/xen/drivers/cpufreq/utility.c
@@ -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();
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.