From: Viresh Kumar <viresh.kumar@linaro.org>
To: Stratos Karafotis <stratosk@semaphore.gr>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 05/20] cpufreq: dbx500: Use cpufreq_for_each_entry macro for iteration
Date: Tue, 15 Apr 2014 11:06:33 +0530 [thread overview]
Message-ID: <CAKohpo=6fK0DzvPq_a=kEKV4kSBWjyEBzQoS5eqVAAGstb6=2A@mail.gmail.com> (raw)
In-Reply-To: <534C4E5D.40508@semaphore.gr>
On 15 April 2014 02:38, Stratos Karafotis <stratosk@semaphore.gr> wrote:
> The cpufreq core supports the cpufreq_for_each_entry macro helper
> for iteration over the cpufreq_frequency_table, so use it.
>
> It should have no functional changes.
>
> Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
> ---
> drivers/cpufreq/dbx500-cpufreq.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c
> index 412a78b..2a0635c 100644
> --- a/drivers/cpufreq/dbx500-cpufreq.c
> +++ b/drivers/cpufreq/dbx500-cpufreq.c
> @@ -45,7 +45,7 @@ static struct cpufreq_driver dbx500_cpufreq_driver = {
>
> static int dbx500_cpufreq_probe(struct platform_device *pdev)
> {
> - int i = 0;
> + struct cpufreq_frequency_table *pos;
>
> freq_table = dev_get_platdata(&pdev->dev);
> if (!freq_table) {
> @@ -60,9 +60,8 @@ static int dbx500_cpufreq_probe(struct platform_device *pdev)
> }
>
> pr_info("dbx500-cpufreq: Available frequencies:\n");
> - while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
> - pr_info(" %d Mhz\n", freq_table[i].frequency/1000);
> - i++;
> + cpufreq_for_each_entry(pos, freq_table) {
> + pr_info(" %d Mhz\n", pos->frequency / 1000);
> }
Remove {}
prev parent reply other threads:[~2014-04-15 5:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 21:08 [PATCH 05/20] cpufreq: dbx500: Use cpufreq_for_each_entry macro for iteration Stratos Karafotis
2014-04-15 5:36 ` Viresh Kumar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKohpo=6fK0DzvPq_a=kEKV4kSBWjyEBzQoS5eqVAAGstb6=2A@mail.gmail.com' \
--to=viresh.kumar@linaro.org \
--cc=cpufreq@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=stratosk@semaphore.gr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).