cpufreq: intel_pstate: Do not walk policy->cpus
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Mar 2017 22:22:16 +0000 (00:22 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 Mar 2017 21:12:16 +0000 (23:12 +0200)
commit2bfc4cbb5fd3848669f1b95fea793f63d8e77fa0
tree2bd87001b339a4062d78060edb5ad71330165eff
parent8ca6ce37014e5a9b127fc076448eb95e2b366d05
cpufreq: intel_pstate: Do not walk policy->cpus

intel_pstate_hwp_set() is the only function walking policy->cpus
in intel_pstate.  The rest of the code simply assumes one CPU per
policy, including the initialization code.

Therefore it doesn't make sense for intel_pstate_hwp_set() to
walk policy->cpus as it is guaranteed to have only one bit set
for policy->cpu.

For this reason, rearrange intel_pstate_hwp_set() to take the CPU
number as the argument and drop the loop over policy->cpus from it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c