Linux Power Management development
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Steve Muckle <steve.muckle@linaro.org>,
	linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH] cpufreq: Fix incorrect usage of clamp_val()
Date: Wed, 1 Jun 2016 07:02:28 +0530	[thread overview]
Message-ID: <20160601013228.GA3725@vireshk-i7> (raw)
In-Reply-To: <4985583.nmytFqifgB@vostro.rjw.lan>

On 31-05-16, 22:46, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Subject: [PATCH] cpufreq: Fix clamp_val() usage in cpufreq_driver_fast_switch()
> 
> The return value of clamp_val() has to be stored actually.
> 
> Fixes: b7898fda5bc7 (cpufreq: Support for fast frequency switching)
> Reported-by: Steve Muckle <steve.muckle@linaro.org>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/cpufreq/cpufreq.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-pm/drivers/cpufreq/cpufreq.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq.c
> +++ linux-pm/drivers/cpufreq/cpufreq.c
> @@ -1829,7 +1829,7 @@ EXPORT_SYMBOL(cpufreq_unregister_notifie
>  unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
>  					unsigned int target_freq)
>  {
> -	clamp_val(target_freq, policy->min, policy->max);
> +	target_freq = clamp_val(target_freq, policy->min, policy->max);
>  
>  	return cpufreq_driver->fast_switch(policy, target_freq);
>  }

I should have at least grepped for it during my fix.

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

-- 
viresh

  reply	other threads:[~2016-06-01  1:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 11:19 [PATCH] cpufreq: Fix incorrect usage of clamp_val() Viresh Kumar
2016-05-31 18:23 ` Steve Muckle
2016-05-31 20:46   ` Rafael J. Wysocki
2016-06-01  1:32     ` Viresh Kumar [this message]
2016-05-31 20:44 ` Rafael J. Wysocki

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=20160601013228.GA3725@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=steve.muckle@linaro.org \
    /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