Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sudeep Holla and committed by
Rafael J. Wysocki
b20a3f3d ccc03d86

-2
-1
drivers/cpufreq/cppc_cpufreq.c
··· 172 172 return -EFAULT; 173 173 } 174 174 175 - cpumask_set_cpu(policy->cpu, policy->cpus); 176 175 cpu->cur_policy = policy; 177 176 178 177 /* Set policy->cur to max now. The governors will adjust later. */
-1
drivers/cpufreq/intel_pstate.c
··· 2124 2124 policy->cpuinfo.max_freq *= cpu->pstate.scaling; 2125 2125 2126 2126 intel_pstate_init_acpi_perf_limits(policy); 2127 - cpumask_set_cpu(policy->cpu, policy->cpus); 2128 2127 2129 2128 policy->fast_switch_possible = true; 2130 2129