]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb5e84ba548a1d411f17353e3b6a6e12d2975979b
treea700f0dc52e355010ab9d7f5adf4396f9541c8a9
parent9a2e7db0e9f57899c3932ffbbbc2691346e995ff
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