aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idlestat.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/idlestat.c b/idlestat.c
index 22a9781..4d773f4 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -696,21 +696,11 @@ static void merge_pstates(struct cpuidle_datas *datas,
percpu_a = &(datas->pstates[cpu]);
percpu_b = &(baseline->pstates[cpu]);
- for (idx = 0; idx < percpu_a->max && idx < percpu_b->max; ) {
- if (percpu_a->pstate[idx].freq >
- percpu_b->pstate[idx].freq) {
- assert(alloc_pstate(percpu_b,
- percpu_a->pstate[idx].freq) == idx);
- continue;
- }
- if (percpu_a->pstate[idx].freq <
- percpu_b->pstate[idx].freq) {
- assert(alloc_pstate(percpu_a,
- percpu_b->pstate[idx].freq) == idx);
- continue;
- }
- ++idx;
- }
+ for (idx = 0; idx < percpu_a->max; ++idx)
+ alloc_pstate(percpu_b, percpu_a->pstate[idx].freq);
+
+ for (idx = 0; idx < percpu_b->max; ++idx)
+ alloc_pstate(percpu_a, percpu_b->pstate[idx].freq);
}
}