Re: [PATCH 01/20] cpufreq: Introduce macros for cpufreq_frequency_table iteration

From: Viresh Kumar
Date: Tue Apr 15 2014 - 01:31:05 EST


On 15 April 2014 02:37, Stratos Karafotis <stratosk@xxxxxxxxxxxx> wrote:
> diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
> @@ -193,9 +191,9 @@ int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy,
> return -ENOENT;
> }
>
> - for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
> - if (table[i].frequency == freq)
> - return i;
> + cpufreq_for_each_entry(pos, table) {
> + if (pos->frequency == freq)
> + return pos - table;
> }

I asked you to do this in V1:

use cpufreq_for_each_valid_entry() here as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/