diff options
-rw-r--r-- | drivers/cpuidle/governors/teo.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c index bd2fe41b4287..95d76c8e0d12 100644 --- a/drivers/cpuidle/governors/teo.c +++ b/drivers/cpuidle/governors/teo.c @@ -292,7 +292,6 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev, unsigned int hit_sum = 0; int constraint_idx = 0; int idx0 = 0, idx = -1; - int prev_intercept_idx; s64 duration_ns; int i; @@ -370,7 +369,6 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev, * all of the deeper states, a shallower idle state is likely to be a * better choice. */ - prev_intercept_idx = idx; if (2 * idx_intercept_sum > cpu_data->total - idx_hit_sum) { int first_suitable_idx = idx; @@ -437,14 +435,11 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev, idx = constraint_idx; if (!idx) { - if (prev_intercept_idx) { - /* - * Query the sleep length to be able to count the wakeup - * as a hit if it is caused by a timer. - */ - duration_ns = tick_nohz_get_sleep_length(&delta_tick); - cpu_data->sleep_length_ns = duration_ns; - } + /* + * Query the sleep length to be able to count the wakeup as a + * hit if it is caused by a timer. + */ + cpu_data->sleep_length_ns = tick_nohz_get_sleep_length(&delta_tick); goto out_tick; } |