diff options
author | Stratos Karafotis <stratosk@semaphore.gr> | 2014-07-18 11:37:21 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-21 07:43:18 -0400 |
commit | 285cb99091fad1416958eb7d9fb8ecf7328d8bef (patch) | |
tree | da97fed2bf28f01698a72b99a99d87d5aaacf5e8 /drivers | |
parent | 2d8d1f18ed2b51bcc65a99bf940514b1a697b5f2 (diff) |
cpufreq: intel_pstate: Cleanup parentheses
Remove unnecessary parentheses.
Also, add parentheses in one case for better readability.
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 424c5a98771d..dee9e5882937 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -443,7 +443,7 @@ static int core_get_turbo_pstate(void) | |||
443 | 443 | ||
444 | rdmsrl(MSR_NHM_TURBO_RATIO_LIMIT, value); | 444 | rdmsrl(MSR_NHM_TURBO_RATIO_LIMIT, value); |
445 | nont = core_get_max_pstate(); | 445 | nont = core_get_max_pstate(); |
446 | ret = ((value) & 255); | 446 | ret = (value) & 255; |
447 | if (ret <= nont) | 447 | if (ret <= nont) |
448 | ret = nont; | 448 | ret = nont; |
449 | return ret; | 449 | return ret; |
@@ -617,7 +617,7 @@ static inline int32_t intel_pstate_get_scaled_busy(struct cpudata *cpu) | |||
617 | current_pstate = int_tofp(cpu->pstate.current_pstate); | 617 | current_pstate = int_tofp(cpu->pstate.current_pstate); |
618 | core_busy = mul_fp(core_busy, div_fp(max_pstate, current_pstate)); | 618 | core_busy = mul_fp(core_busy, div_fp(max_pstate, current_pstate)); |
619 | 619 | ||
620 | sample_time = (pid_params.sample_rate_ms * USEC_PER_MSEC); | 620 | sample_time = pid_params.sample_rate_ms * USEC_PER_MSEC; |
621 | duration_us = (u32) ktime_us_delta(cpu->sample.time, | 621 | duration_us = (u32) ktime_us_delta(cpu->sample.time, |
622 | cpu->last_sample_time); | 622 | cpu->last_sample_time); |
623 | if (duration_us > sample_time * 3) { | 623 | if (duration_us > sample_time * 3) { |
@@ -751,7 +751,7 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) | |||
751 | limits.min_perf_pct = clamp_t(int, limits.min_perf_pct, 0 , 100); | 751 | limits.min_perf_pct = clamp_t(int, limits.min_perf_pct, 0 , 100); |
752 | limits.min_perf = div_fp(int_tofp(limits.min_perf_pct), int_tofp(100)); | 752 | limits.min_perf = div_fp(int_tofp(limits.min_perf_pct), int_tofp(100)); |
753 | 753 | ||
754 | limits.max_policy_pct = policy->max * 100 / policy->cpuinfo.max_freq; | 754 | limits.max_policy_pct = (policy->max * 100) / policy->cpuinfo.max_freq; |
755 | limits.max_policy_pct = clamp_t(int, limits.max_policy_pct, 0 , 100); | 755 | limits.max_policy_pct = clamp_t(int, limits.max_policy_pct, 0 , 100); |
756 | limits.max_perf_pct = min(limits.max_policy_pct, limits.max_sysfs_pct); | 756 | limits.max_perf_pct = min(limits.max_policy_pct, limits.max_sysfs_pct); |
757 | limits.max_perf = div_fp(int_tofp(limits.max_perf_pct), int_tofp(100)); | 757 | limits.max_perf = div_fp(int_tofp(limits.max_perf_pct), int_tofp(100)); |
@@ -763,8 +763,8 @@ static int intel_pstate_verify_policy(struct cpufreq_policy *policy) | |||
763 | { | 763 | { |
764 | cpufreq_verify_within_cpu_limits(policy); | 764 | cpufreq_verify_within_cpu_limits(policy); |
765 | 765 | ||
766 | if ((policy->policy != CPUFREQ_POLICY_POWERSAVE) && | 766 | if (policy->policy != CPUFREQ_POLICY_POWERSAVE && |
767 | (policy->policy != CPUFREQ_POLICY_PERFORMANCE)) | 767 | policy->policy != CPUFREQ_POLICY_PERFORMANCE) |
768 | return -EINVAL; | 768 | return -EINVAL; |
769 | 769 | ||
770 | return 0; | 770 | return 0; |