linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: schedutil: Simplify sugov_fast_switch()
Date: Wed, 7 Oct 2020 10:41:28 +0530	[thread overview]
Message-ID: <20201007051128.odqiwuex3vqwxumo@vireshk-i7> (raw)
In-Reply-To: <1869109.WhRmcVd4D2@kreacher>

On 06-10-20, 14:01, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Drop a redundant local variable definition from sugov_fast_switch()
> and rearrange the code in there to avoid the redundant logical
> negation.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> 
> The code reads a bit easier after this change IMV.
> 
> linux-next material.
> 
> ---
>  kernel/sched/cpufreq_schedutil.c |    8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> Index: linux-pm/kernel/sched/cpufreq_schedutil.c
> ===================================================================
> --- linux-pm.orig/kernel/sched/cpufreq_schedutil.c
> +++ linux-pm/kernel/sched/cpufreq_schedutil.c
> @@ -114,12 +114,8 @@ static bool sugov_update_next_freq(struc
>  static void sugov_fast_switch(struct sugov_policy *sg_policy, u64 time,
>  			      unsigned int next_freq)
>  {
> -	struct cpufreq_policy *policy = sg_policy->policy;
> -
> -	if (!sugov_update_next_freq(sg_policy, time, next_freq))
> -		return;
> -
> -	cpufreq_driver_fast_switch(policy, next_freq);
> +	if (sugov_update_next_freq(sg_policy, time, next_freq))
> +		cpufreq_driver_fast_switch(sg_policy->policy, next_freq);
>  }
>  
>  static void sugov_deferred_update(struct sugov_policy *sg_policy, u64 time,

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

      reply	other threads:[~2020-10-07  5:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 12:01 [PATCH] cpufreq: schedutil: Simplify sugov_fast_switch() Rafael J. Wysocki
2020-10-07  5:11 ` Viresh Kumar [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=20201007051128.odqiwuex3vqwxumo@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=peterz@infradead.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).