Skip to content

Commit b20a3f3

Browse files
sudeep-hollarafaeljw
authored andcommitted
cpufreq: remove setting of policy->cpu in policy->cpus during init
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>
1 parent ccc03d8 commit b20a3f3

2 files changed

Lines changed: 0 additions & 2 deletions

File tree

‎drivers/cpufreq/cppc_cpufreq.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
172172
return -EFAULT;
173173
}
174174

175-
cpumask_set_cpu(policy->cpu, policy->cpus);
176175
cpu->cur_policy = policy;
177176

178177
/* Set policy->cur to max now. The governors will adjust later. */

‎drivers/cpufreq/intel_pstate.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,6 @@ static int __intel_pstate_cpu_init(struct cpufreq_policy *policy)
21242124
policy->cpuinfo.max_freq *= cpu->pstate.scaling;
21252125

21262126
intel_pstate_init_acpi_perf_limits(policy);
2127-
cpumask_set_cpu(policy->cpu, policy->cpus);
21282127

21292128
policy->fast_switch_possible = true;
21302129

0 commit comments

Comments
 (0)