diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-28 00:24:26 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-28 23:12:17 +0200 |
commit | b02aabe8ab9757a7dd5aa50e201a6d970f7e7a2f (patch) | |
tree | 6e05a7ec23661adf1f79c943af57c1909278f9f5 /arch/avr32 | |
parent | 2bfc4cbb5fd3848669f1b95fea793f63d8e77fa0 (diff) | |
download | linux-b02aabe8ab9757a7dd5aa50e201a6d970f7e7a2f.tar.gz |
cpufreq: intel_pstate: Eliminate intel_pstate_get_min_max()
Some computations in intel_pstate_get_min_max() are not necessary
and one of its two callers doesn't even use the full result.
First off, the fixed-point value of cpu->max_perf represents a
non-negative number between 0 and 1 inclusive and cpu->min_perf
cannot be greater than cpu->max_perf. It is not necessary to check
those conditions every time the numbers in question are used.
Moreover, since intel_pstate_max_within_limits() only needs the
upper boundary, it doesn't make sense to compute the lower one in
there and returning min and max from intel_pstate_get_min_max()
via pointers doesn't look particularly nice.
For the above reasons, drop intel_pstate_get_min_max(), add a helper
to get the base P-state for min/max computations and carry out them
directly in the previous callers of intel_pstate_get_min_max().
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/avr32')
0 files changed, 0 insertions, 0 deletions