Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 478987b0 authored by Junjie Wu's avatar Junjie Wu Committed by Gerrit - the friendly Code Review server
Browse files

cpufreq: interactive: Correctly reschedule timer for slack_only case



Slack timer's expire field was not correctly initialized if slack_only
is true in cpufreq_interactive_timer_resched(). This causes both
compilation warning and functional breakage.

Fix expire field by setting it properly.

Change-Id: I2f8c454d63626876522c163eb8d3c5d1c8adfd51
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent da9777c8
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -188,6 +188,7 @@ static void cpufreq_interactive_timer_resched(unsigned long cpu,
	int i;

	spin_lock_irqsave(&ppol->load_lock, flags);
	expires = round_to_nw_start(ppol->last_evaluated_jiffy, tunables);
	if (!slack_only) {
		for_each_cpu(i, ppol->policy->cpus) {
			pcpu = &per_cpu(cpuinfo, i);
@@ -198,8 +199,6 @@ static void cpufreq_interactive_timer_resched(unsigned long cpu,
			pcpu->cputime_speedadj_timestamp =
						pcpu->time_in_idle_timestamp;
		}
		expires = round_to_nw_start(ppol->last_evaluated_jiffy,
					    tunables);
		del_timer(&ppol->policy_timer);
		ppol->policy_timer.expires = expires;
		add_timer(&ppol->policy_timer);