From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM list <linux-pm@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] intel_pstate: Simplify conditional in intel_pstate_set_policy()
Date: Thu, 12 May 2016 17:36:05 -0700 [thread overview]
Message-ID: <1463099765.991.26.camel@linux.intel.com> (raw)
In-Reply-To: <3708662.2e5qAbF2Fs@vostro.rjw.lan>
On Thu, 2016-05-12 at 00:46 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> One of the if () statements in intel_pstate_set_policy() causes
> another if () to be evaluated if the condition is true and it
> doesn't do anything else, so merge the two if () statements into
> one.
>
> No functional changes.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> drivers/cpufreq/intel_pstate.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/intel_pstate.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/intel_pstate.c
> +++ linux-pm/drivers/cpufreq/intel_pstate.c
> @@ -1449,12 +1449,11 @@ static int intel_pstate_set_policy(struc
> intel_pstate_clear_update_util_hook(policy->cpu);
>
> cpu = all_cpu_data[0];
> - if (cpu->pstate.max_pstate_physical > cpu-
> >pstate.max_pstate) {
> - if (policy->max < policy->cpuinfo.max_freq &&
> - policy->max > cpu->pstate.max_pstate * cpu-
> >pstate.scaling) {
> - pr_debug("policy->max > max non turbo
> frequency\n");
> - policy->max = policy->cpuinfo.max_freq;
> - }
> + if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate
> &&
> + policy->max < policy->cpuinfo.max_freq &&
> + policy->max > cpu->pstate.max_pstate * cpu-
> >pstate.scaling) {
> + pr_debug("policy->max > max non turbo frequency\n");
> + policy->max = policy->cpuinfo.max_freq;
> }
>
> if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2016-05-13 0:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 22:46 [PATCH] intel_pstate: Simplify conditional in intel_pstate_set_policy() Rafael J. Wysocki
2016-05-13 0:36 ` Srinivas Pandruvada [this message]
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=1463099765.991.26.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).