cpufreq: Do not clear real_cpus mask on policy init
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 13 Feb 2017 12:44:57 +0000 (13:44 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 15 Feb 2017 23:57:42 +0000 (00:57 +0100)
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>
drivers/cpufreq/cpufreq.c

index 408479540566678924a60829c9808ca4af8f298f..80a785ad17e81c97ffb0a79b51b16c9758888e22 100644 (file)
@@ -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);
        }
 
        /*