cpufreq: intel_pstate: Rearrange the storing of new EPP values
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Jul 2020 15:15:43 +0000 (17:15 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 30 Jul 2020 16:19:52 +0000 (18:19 +0200)
commit3a9571760665817a269eb8f74749cbc231e7af45
treea700f0dc52e355010ab9d7f5adf4396f9541c8a9
parent80e30368669e0387d9778b15bd1b985074725a2e
cpufreq: intel_pstate: Rearrange the storing of new EPP values

Move the locking away from intel_pstate_set_energy_pref_index()
into its only caller and drop the (now redundant) return_pref label
from it.

Also move the "raw" EPP value check into the caller of that function,
so as to do it before acquiring the mutex, and reduce code duplication
related to the "raw" EPP values processing somewhat.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
drivers/cpufreq/intel_pstate.c