cpufreq: Use cpumask_copy instead of cpumask_or to copy a mask
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 15 Oct 2015 16:05:21 +0000 (21:35 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 28 Oct 2015 08:21:11 +0000 (09:21 +0100)
->related_cpus is empty at this point of time and copying ->cpus to it
or orring ->related_cpus with ->cpus would result in the same value. But
cpumask_copy makes it rather clear.

Reviewed-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c

index 8701dc559850682b8fadef553487aeac21db4252..16b9e811ff01115eae1c3dd05bd018c773a0c85a 100644 (file)
@@ -1214,7 +1214,7 @@ static int cpufreq_online(unsigned int cpu)
 
        if (new_policy) {
                /* related_cpus should at least include policy->cpus. */
-               cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus);
+               cpumask_copy(policy->related_cpus, policy->cpus);
                /* Remember CPUs present at the policy creation time. */
                cpumask_and(policy->real_cpus, policy->cpus, cpu_present_mask);
        }