linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <shuah@kernel.org>
To: Stafford Horne <shorne@gmail.com>, Prarit Bhargava <prarit@redhat.com>
Cc: linux-pm@vger.kernel.org, Thomas Renninger <trenn@suse.com>,
	Shuah Khan <shuahkh@osg.samsung.com>,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH v2] cpupower: Fix no-rounding MHz frequency output
Date: Wed, 1 Nov 2017 15:01:26 -0600	[thread overview]
Message-ID: <a2fa979c-91ab-d6ed-71e0-47b7f473786c@kernel.org> (raw)
In-Reply-To: <20171025220156.GH2694@lianli.shorne-pla.net>

On 10/25/2017 04:01 PM, Stafford Horne wrote:
> On Wed, Oct 25, 2017 at 09:51:32AM -0400, Prarit Bhargava wrote:
>> 'cpupower frequency-info -ln' returns kHz values on systems with MHz range
>> minimum CPU frequency range.  For example, on a 800MHz to 4.20GHz system
>> the command returns
>>
>> hardware limits: 800000 MHz - 4.200000 GHz
>>
>> The code that causes this error can be removed.  The next else if clause
>> will handle the output correctly such that
>>
>> hardware limits: 800.000 MHz - 4.200000 GHz
>>
>> is displayed correctly.
>>
>> [v2]: Remove two lines instead of fixing broken code.
>>
>> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
>> Cc: Thomas Renninger <trenn@suse.com>
>> Cc: Stafford Horne <shorne@gmail.com>
>> Cc: Shuah Khan <shuah@kernel.org>
> 
> Reviewed-by: Stafford Horne <shorne@gmail.com>

Thanks for the review.

-- Shuah

> 
>> ---
>>  tools/power/cpupower/utils/cpufreq-info.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/tools/power/cpupower/utils/cpufreq-info.c b/tools/power/cpupower/utils/cpufreq-info.c
>> index 3e701f0e9c14..df43cd45d810 100644
>> --- a/tools/power/cpupower/utils/cpufreq-info.c
>> +++ b/tools/power/cpupower/utils/cpufreq-info.c
>> @@ -93,8 +93,6 @@ static void print_speed(unsigned long speed)
>>  		if (speed > 1000000)
>>  			printf("%u.%06u GHz", ((unsigned int) speed/1000000),
>>  				((unsigned int) speed%1000000));
>> -		else if (speed > 100000)
>> -			printf("%u MHz", (unsigned int) speed);
>>  		else if (speed > 1000)
>>  			printf("%u.%03u MHz", ((unsigned int) speed/1000),
>>  				(unsigned int) (speed%1000));
>> -- 
>> 2.15.0.rc0.39.g2f0e14e64
>>
> 
> 

  reply	other threads:[~2017-11-01 21:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 13:51 [PATCH v2] cpupower: Fix no-rounding MHz frequency output Prarit Bhargava
2017-10-25 22:01 ` Stafford Horne
2017-11-01 21:01   ` Shuah Khan [this message]
2017-11-01 21:00 ` Shuah Khan
2017-11-01 21:33   ` Rafael J. Wysocki
2017-11-01 21:38     ` Shuah Khan
2017-11-01 21:46       ` Rafael J. Wysocki
2017-11-01 21:49         ` Shuah Khan
2017-11-01 22:07           ` Rafael J. Wysocki
2017-11-01 22:30             ` Shuah Khan
2017-11-01 22:34               ` Rafael J. Wysocki
2017-11-02  0:42               ` Prarit Bhargava
2017-11-02 18:59                 ` Shuah Khan
2017-11-02 19:43                   ` Prarit Bhargava
2017-11-02 20:05                   ` Prarit Bhargava
2017-11-02 20:18                   ` Prarit Bhargava
2017-11-02 20:20                     ` Shuah Khan

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=a2fa979c-91ab-d6ed-71e0-47b7f473786c@kernel.org \
    --to=shuah@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=prarit@redhat.com \
    --cc=shorne@gmail.com \
    --cc=shuahkh@osg.samsung.com \
    --cc=trenn@suse.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 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 NNTP newsgroup(s).