cpufreq: remove setting of policy->cpu in policy->cpus during init
authorSudeep Holla <Sudeep.Holla@arm.com>
Thu, 10 Aug 2017 14:58:57 +0000 (15:58 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 17 Aug 2017 23:41:37 +0000 (01:41 +0200)
policy->cpu is copied into policy->cpus in cpufreq_online() before
calling into cpufreq_driver->init(). So there's no need to set the
same in the individual driver init() functions again.

This patch removes the redundant setting of policy->cpu in policy->cpus
in intel_pstate and cppc drivers.

Reported-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cppc_cpufreq.c
drivers/cpufreq/intel_pstate.c

index 10be285..a1c3025 100644 (file)
@@ -172,7 +172,6 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
                return -EFAULT;
        }
 
-       cpumask_set_cpu(policy->cpu, policy->cpus);
        cpu->cur_policy = policy;
 
        /* Set policy->cur to max now. The governors will adjust later. */
index c1100a3..5c20d2c 100644 (file)
@@ -2124,7 +2124,6 @@ static int __intel_pstate_cpu_init(struct cpufreq_policy *policy)
        policy->cpuinfo.max_freq *= cpu->pstate.scaling;
 
        intel_pstate_init_acpi_perf_limits(policy);
-       cpumask_set_cpu(policy->cpu, policy->cpus);
 
        policy->fast_switch_possible = true;