[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKohpomsXSGARKmc5hamXb7joPp+8M8CyEKAbkZ0z7bJboHCdA@mail.gmail.com>
Date: Tue, 15 Apr 2014 11:00:53 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Stratos Karafotis <stratosk@...aphore.gr>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
"David S. Miller" <davem@...emloft.net>,
Hans-Christian Egtvedt <egtvedt@...fundet.no>,
Dirk Brandewie <dirk.j.brandewie@...el.com>,
Randy Dunlap <rdunlap@...radead.org>,
linux-doc@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"cpufreq@...r.kernel.org" <cpufreq@...r.kernel.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH 01/20] cpufreq: Introduce macros for cpufreq_frequency_table
iteration
On 15 April 2014 02:37, Stratos Karafotis <stratosk@...aphore.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists