From: Troy Kisky <troy.kisky@boundarydevices.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Mats Fagerstrom <mats.fagerstrom@stericsson.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
cpufreq@vger.kernel.org,
Rickard Andersson <rickard.andersson@stericsson.com>,
Ulf Hansson <ulf.hansson@stericsson.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] cpufreq: dbx500: Round to closest available freq
Date: Thu, 11 Apr 2013 14:52:39 -0700 [thread overview]
Message-ID: <516730A7.60206@boundarydevices.com> (raw)
In-Reply-To: <1512269.3ZuqNVLx3s@vostro.rjw.lan>
On 4/11/2013 2:33 PM, Rafael J. Wysocki wrote:
> On Thursday, April 11, 2013 10:33:07 PM Linus Walleij wrote:
>> On Wed, Apr 10, 2013 at 3:06 PM, Ulf Hansson <ulf.hansson@stericsson.com> wrote:
>>
>>> From: Mats Fagerstrom <mats.fagerstrom@stericsson.com>
>>>
>>> When reading the cpu speed, round it to the closest available
>>> frequency from the table.
>>>
>>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>> Signed-off-by: Mats Fagerstrom <mats.fagerstrom@stericsson.com>
>> (...)
>>> + /* The value is rounded to closest frequency in the defined table. */
>>> + while (freq_table[i + 1].frequency != CPUFREQ_TABLE_END) {
>>> + if (freq < freq_table[i].frequency +
>>> + (freq_table[i + 1].frequency - freq_table[i].frequency) / 2)
if (freq < (freq_table[i].frequency + freq_table[i + 1].frequency) / 2)
is easier to read.
>>> return freq_table[i].frequency;
>> Oh that works, clever.
>>
>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> Thanks, applied.
>
> Rafael
>
>
WARNING: multiple messages have this Message-ID (diff)
From: troy.kisky@boundarydevices.com (Troy Kisky)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] cpufreq: dbx500: Round to closest available freq
Date: Thu, 11 Apr 2013 14:52:39 -0700 [thread overview]
Message-ID: <516730A7.60206@boundarydevices.com> (raw)
In-Reply-To: <1512269.3ZuqNVLx3s@vostro.rjw.lan>
On 4/11/2013 2:33 PM, Rafael J. Wysocki wrote:
> On Thursday, April 11, 2013 10:33:07 PM Linus Walleij wrote:
>> On Wed, Apr 10, 2013 at 3:06 PM, Ulf Hansson <ulf.hansson@stericsson.com> wrote:
>>
>>> From: Mats Fagerstrom <mats.fagerstrom@stericsson.com>
>>>
>>> When reading the cpu speed, round it to the closest available
>>> frequency from the table.
>>>
>>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>> Signed-off-by: Mats Fagerstrom <mats.fagerstrom@stericsson.com>
>> (...)
>>> + /* The value is rounded to closest frequency in the defined table. */
>>> + while (freq_table[i + 1].frequency != CPUFREQ_TABLE_END) {
>>> + if (freq < freq_table[i].frequency +
>>> + (freq_table[i + 1].frequency - freq_table[i].frequency) / 2)
if (freq < (freq_table[i].frequency + freq_table[i + 1].frequency) / 2)
is easier to read.
>>> return freq_table[i].frequency;
>> Oh that works, clever.
>>
>> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> Thanks, applied.
>
> Rafael
>
>
next prev parent reply other threads:[~2013-04-11 21:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 13:06 [PATCH] cpufreq: dbx500: Round to closest available freq Ulf Hansson
2013-04-10 13:06 ` Ulf Hansson
2013-04-11 20:33 ` Linus Walleij
2013-04-11 20:33 ` Linus Walleij
2013-04-11 21:33 ` Rafael J. Wysocki
2013-04-11 21:33 ` Rafael J. Wysocki
2013-04-11 21:52 ` Troy Kisky [this message]
2013-04-11 21:52 ` Troy Kisky
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=516730A7.60206@boundarydevices.com \
--to=troy.kisky@boundarydevices.com \
--cc=cpufreq@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mats.fagerstrom@stericsson.com \
--cc=rickard.andersson@stericsson.com \
--cc=rjw@sisk.pl \
--cc=ulf.hansson@linaro.org \
--cc=ulf.hansson@stericsson.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.