Patchwork cpu: cpufreq: spell Ghz as GHz and Mhz and MHz

login
register
mail settings
Submitter Colin King
Date Dec. 7, 2012, 12:41 a.m.
Message ID <1354840867-7663-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/204362/
State Accepted
Headers show

Comments

Colin King - Dec. 7, 2012, 12:41 a.m.
From: Colin Ian King <colin.king@canonical.com>

The abbreviation GHz and MHz have been wrong for ages. These
need correcting.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/cpu/cpufreq/cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Keng-Yu Lin - Dec. 12, 2012, 2:59 a.m.
On Fri, Dec 7, 2012 at 8:41 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The abbreviation GHz and MHz have been wrong for ages. These
> need correcting.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/cpu/cpufreq/cpufreq.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
> index 7136e7d..98123f1 100644
> --- a/src/cpu/cpufreq/cpufreq.c
> +++ b/src/cpu/cpufreq/cpufreq.c
> @@ -220,11 +220,11 @@ static char *HzToHuman(unsigned long hz)
>         Hz = hz;
>
>         if (Hz > 1500000) {
> -               snprintf(buffer, sizeof(buffer), "%6.2f Ghz",
> +               snprintf(buffer, sizeof(buffer), "%6.2f GHz",
>                         (Hz+50000.0) / 1000000);
>                 return buffer;
>         } else if (Hz > 1000) {
> -               snprintf(buffer, sizeof(buffer), "%6lli Mhz",
> +               snprintf(buffer, sizeof(buffer), "%6lli MHz",
>                         (Hz+500) / 1000);
>                 return buffer;
>         } else {
> --
> 1.8.0
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung - Dec. 12, 2012, 7:46 a.m.
On 12/07/2012 08:41 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The abbreviation GHz and MHz have been wrong for ages. These
> need correcting.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/cpu/cpufreq/cpufreq.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
> index 7136e7d..98123f1 100644
> --- a/src/cpu/cpufreq/cpufreq.c
> +++ b/src/cpu/cpufreq/cpufreq.c
> @@ -220,11 +220,11 @@ static char *HzToHuman(unsigned long hz)
>   	Hz = hz;
>
>   	if (Hz > 1500000) {
> -		snprintf(buffer, sizeof(buffer), "%6.2f Ghz",
> +		snprintf(buffer, sizeof(buffer), "%6.2f GHz",
>   			(Hz+50000.0) / 1000000);
>   		return buffer;
>   	} else if (Hz > 1000) {
> -		snprintf(buffer, sizeof(buffer), "%6lli Mhz",
> +		snprintf(buffer, sizeof(buffer), "%6lli MHz",
>   			(Hz+500) / 1000);
>   		return buffer;
>   	} else {
>
Acked-by: Alex Hung <alex.hung@canonical.com>

Patch

diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
index 7136e7d..98123f1 100644
--- a/src/cpu/cpufreq/cpufreq.c
+++ b/src/cpu/cpufreq/cpufreq.c
@@ -220,11 +220,11 @@  static char *HzToHuman(unsigned long hz)
 	Hz = hz;
 
 	if (Hz > 1500000) {
-		snprintf(buffer, sizeof(buffer), "%6.2f Ghz",
+		snprintf(buffer, sizeof(buffer), "%6.2f GHz",
 			(Hz+50000.0) / 1000000);
 		return buffer;
 	} else if (Hz > 1000) {
-		snprintf(buffer, sizeof(buffer), "%6lli Mhz",
+		snprintf(buffer, sizeof(buffer), "%6lli MHz",
 			(Hz+500) / 1000);
 		return buffer;
 	} else {