From: dirk.brandewie@gmail.com
To: linux-pm@vger.kernel.org
Cc: rjw@rjwysocki.net, Stratos Karafotis <stratosk@semaphore.gr>,
Dirk Brandewie <dirk.j.brandewie@intel.com>
Subject: [PATCH 05/11] cpufreq: intel_pstate: Cleanup parentheses
Date: Fri, 18 Jul 2014 08:37:21 -0700 [thread overview]
Message-ID: <1405697848-13546-6-git-send-email-dirk.j.brandewie@intel.com> (raw)
In-Reply-To: <1405697848-13546-1-git-send-email-dirk.j.brandewie@intel.com>
From: Stratos Karafotis <stratosk@semaphore.gr>
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>
---
drivers/cpufreq/intel_pstate.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 424c5a9..dee9e58 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -443,7 +443,7 @@ static int core_get_turbo_pstate(void)
rdmsrl(MSR_NHM_TURBO_RATIO_LIMIT, value);
nont = core_get_max_pstate();
- ret = ((value) & 255);
+ ret = (value) & 255;
if (ret <= nont)
ret = nont;
return ret;
@@ -617,7 +617,7 @@ static inline int32_t intel_pstate_get_scaled_busy(struct cpudata *cpu)
current_pstate = int_tofp(cpu->pstate.current_pstate);
core_busy = mul_fp(core_busy, div_fp(max_pstate, current_pstate));
- sample_time = (pid_params.sample_rate_ms * USEC_PER_MSEC);
+ sample_time = pid_params.sample_rate_ms * USEC_PER_MSEC;
duration_us = (u32) ktime_us_delta(cpu->sample.time,
cpu->last_sample_time);
if (duration_us > sample_time * 3) {
@@ -751,7 +751,7 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
limits.min_perf_pct = clamp_t(int, limits.min_perf_pct, 0 , 100);
limits.min_perf = div_fp(int_tofp(limits.min_perf_pct), int_tofp(100));
- limits.max_policy_pct = policy->max * 100 / policy->cpuinfo.max_freq;
+ limits.max_policy_pct = (policy->max * 100) / policy->cpuinfo.max_freq;
limits.max_policy_pct = clamp_t(int, limits.max_policy_pct, 0 , 100);
limits.max_perf_pct = min(limits.max_policy_pct, limits.max_sysfs_pct);
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)
{
cpufreq_verify_within_cpu_limits(policy);
- if ((policy->policy != CPUFREQ_POLICY_POWERSAVE) &&
- (policy->policy != CPUFREQ_POLICY_PERFORMANCE))
+ if (policy->policy != CPUFREQ_POLICY_POWERSAVE &&
+ policy->policy != CPUFREQ_POLICY_PERFORMANCE)
return -EINVAL;
return 0;
--
1.9.3
next prev parent reply other threads:[~2014-07-18 15:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 15:37 [PATCH 00/11] intel_pstate updates dirk.brandewie
2014-07-18 15:37 ` [PATCH 01/11] cpufreq: intel_pstate: Make intel_pstate_kobject and debugfs_parent locals dirk.brandewie
2014-07-18 15:37 ` [PATCH 02/11] cpufreq: intel_pstate: Remove unnecessary type casting in div_s64() call dirk.brandewie
2014-07-18 15:37 ` [PATCH 03/11] cpufreq: intel_pstate: Add missing blank lines after declarations dirk.brandewie
2014-07-18 15:37 ` [PATCH 04/11] cpufreq: intel_pstate: Fit code in a single line where possible dirk.brandewie
2014-07-18 15:37 ` dirk.brandewie [this message]
2014-07-18 15:37 ` [PATCH 06/11] cpufreq: intel_pstate: Remove unnecessary intermediate variable sample_time dirk.brandewie
2014-07-18 15:37 ` [PATCH 07/11] cpufreq: intel_pstate: Align multiple lines to open parenthesis dirk.brandewie
2014-07-18 15:37 ` [PATCH 08/11] cpufreq: intel_pstate: Disable interrupts during MSRs reading dirk.brandewie
2014-07-18 15:37 ` [PATCH 09/17] cpufreq: intel_pstate: Keep values in aperf/mperf in full precision dirk.brandewie
2014-07-18 15:37 ` [PATCH 09/11] cpufreq: intel_pstate: Simplify P state adjustment logic dirk.brandewie
2014-07-18 15:37 ` [PATCH 10/11] cpufreq: intel_pstate: Remove core_pct rounding dirk.brandewie
2014-07-18 15:37 ` [PATCH 11/11] cpufreq: intel_pstate: Keep values in aperf/mperf in full precision dirk.brandewie
2014-07-19 20:31 ` [PATCH 00/11] intel_pstate updates Rafael J. Wysocki
2014-07-19 21:01 ` Stratos Karafotis
2014-07-19 21:54 ` Rafael J. Wysocki
2014-07-19 22:05 ` Stratos Karafotis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405697848-13546-6-git-send-email-dirk.j.brandewie@intel.com \
--to=dirk.brandewie@gmail.com \
--cc=dirk.j.brandewie@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=stratosk@semaphore.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).