Re: [PATCH v2 1/3] cpufreq: add resolve_freq driver callback

From: Viresh Kumar
Date: Tue May 31 2016 - 07:15:02 EST


On 25-05-16, 19:52, Steve Muckle wrote:
> +unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy,
> + unsigned int target_freq)
> +{
> + struct cpufreq_frequency_table *freq_table;
> + int index, retval;
> +
> + clamp_val(target_freq, policy->min, policy->max);

Rafael will kill me for this, as I have fallen into the same trap and
copied your *incorrect* code :(

This is a useless statement unless you do:

target_freq = clamp_val(target_freq, policy->min, policy->max);

--
viresh