Re: [PATCH] cpufreq: Fix incorrect usage of clamp_val()
From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2016-06-01 01:32:34
On 31-05-16, 22:46, Rafael J. Wysocki wrote:
quoted hunk ↗ jump to hunk
From: Rafael J. Wysocki <redacted> 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 <redacted> Signed-off-by: Rafael J. Wysocki <redacted> --- 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