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

Commit a26c0704 authored by Junjie Wu's avatar Junjie Wu Committed by Stephen Boyd
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>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 004369ad
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -210,6 +210,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);
@@ -220,8 +221,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);