Skip to content

Commit

Permalink
cpufreq: Do not clear real_cpus mask on policy init
Browse files Browse the repository at this point in the history
If new_policy is set in cpufreq_online(), the policy object has just
been created and its real_cpus mask has been zeroed on allocation,
and the driver's ->init() callback should not touch it.

It doesn't need to be cleared again, so don't do that.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
  • Loading branch information
Rafael J. Wysocki committed Feb 15, 2017
1 parent 051bd84 commit f451014
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,8 +1166,6 @@ static int cpufreq_online(unsigned int cpu)
if (new_policy) {
/* related_cpus should at least include policy->cpus. */
cpumask_copy(policy->related_cpus, policy->cpus);
/* Clear mask of registered CPUs */
cpumask_clear(policy->real_cpus);
}

/*
Expand Down

0 comments on commit f451014

Please sign in to comment.