+18
−16
Loading
mainline inclusion from mainline-v6.10 commit c626a438452079824139f97137f17af47b1a8989 category: bugfix bugzilla: https://gitee.com/openeuler/intel-kernel/issues/IB6QC4 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c626a438452079824139f97137f17af47b1a8989 ------------------------------------------------- Intel-SIG: commit c626a4384520 cpufreq: intel_pstate: Rearrange show_no_turbo() and store_no_turbo(). Backport intel_pstate driver update for 6.6 from 6.11 Now that global.turbo_disabled can only change at the cpufreq driver registration time, initialize global.no_turbo at that time too so they are in sync to start with (if the former is set, the latter cannot be updated later anyway). That allows show_no_turbo() to be simlified because it does not need to check global.turbo_disabled and store_no_turbo() can be rearranged to avoid doing anything if the new value of global.no_turbo is equal to the current one and only return an error on attempts to clear global.no_turbo when global.turbo_disabled. While at it, eliminate the redundant ret variable from store_no_turbo(). No intentional functional impact. Signed-off-by:Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ Yingbao Jia: amend commit log ] Signed-off-by:
Yingbao Jia <yingbao.jia@intel.com>