lkml.org 
[lkml]   [2014]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 01/20] cpufreq: Introduce macros for cpufreq_frequency_table iteration
From
On 15 April 2014 02:37, Stratos Karafotis <stratosk@semaphore.gr> 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.


\
 
 \ /
  Last update: 2014-04-15 07:41    [W:0.043 / U:51.424 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site