Patchwork cpu: cpufreq: tidy up information message formatting

login
register
mail settings
Submitter Colin King
Date Feb. 19, 2013, 11:13 a.m.
Message ID <1361272436-31996-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/221667/
State Accepted
Headers show

Comments

Colin King - Feb. 19, 2013, 11:13 a.m.
From: Colin Ian King <colin.king@canonical.com>

Tidy up information messages - remove \n and emit each line
individually to ensure formatted logging in xml and html looks sane.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/cpu/cpufreq/cpufreq.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
Alex Hung - Feb. 20, 2013, 1:45 a.m.
On 02/19/2013 07:13 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Tidy up information messages - remove \n and emit each line
> individually to ensure formatted logging in xml and html looks sane.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/cpu/cpufreq/cpufreq.c | 13 ++++++-------
>   1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
> index 94f2060..fd37b9d 100644
> --- a/src/cpu/cpufreq/cpufreq.c
> +++ b/src/cpu/cpufreq/cpufreq.c
> @@ -619,13 +619,12 @@ static int cpufreq_test1(fwts_framework *fw)
>   		"various frequency states (P-states) that the BIOS advertises "
>   		"for the processor. For each processor/frequency combination, "
>   		"a quick performance value is measured. The test then validates that:");
> -	fwts_log_info_verbatum(fw,
> -		"  1) Each processor has the same number of frequency states\n"
> -		"  2) Higher advertised frequencies have a higher performance\n"
> -		"  3) No duplicate frequency values are reported by the BIOS\n"
> -		"  4) Is BIOS wrongly doing Sw_All P-state coordination across cores\n"
> -		"  5) Is BIOS wrongly doing Sw_Any P-state coordination across cores\n");
> -
> +	fwts_log_info_verbatum(fw, "  1. Each processor has the same number of frequency states.");
> +	fwts_log_info_verbatum(fw, "  2. Higher advertised frequencies have a higher performance.");
> +	fwts_log_info_verbatum(fw, "  3. No duplicate frequency values are reported by the BIOS.");
> +	fwts_log_info_verbatum(fw, "  4. BIOS doing Sw_All P-state coordination across cores.");
> +	fwts_log_info_verbatum(fw, "  5. BIOS doing Sw_Any P-state coordination across cores.");
> +	fwts_log_nl(fw);
>
>   	/* First set all processors to their lowest speed */
>   	if ((dir = opendir(FWTS_CPU_PATH)) == NULL) {
>
Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - Feb. 20, 2013, 5:48 a.m.
On Tue, Feb 19, 2013 at 7:13 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Tidy up information messages - remove \n and emit each line
> individually to ensure formatted logging in xml and html looks sane.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/cpu/cpufreq/cpufreq.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
> index 94f2060..fd37b9d 100644
> --- a/src/cpu/cpufreq/cpufreq.c
> +++ b/src/cpu/cpufreq/cpufreq.c
> @@ -619,13 +619,12 @@ static int cpufreq_test1(fwts_framework *fw)
>                 "various frequency states (P-states) that the BIOS advertises "
>                 "for the processor. For each processor/frequency combination, "
>                 "a quick performance value is measured. The test then validates that:");
> -       fwts_log_info_verbatum(fw,
> -               "  1) Each processor has the same number of frequency states\n"
> -               "  2) Higher advertised frequencies have a higher performance\n"
> -               "  3) No duplicate frequency values are reported by the BIOS\n"
> -               "  4) Is BIOS wrongly doing Sw_All P-state coordination across cores\n"
> -               "  5) Is BIOS wrongly doing Sw_Any P-state coordination across cores\n");
> -
> +       fwts_log_info_verbatum(fw, "  1. Each processor has the same number of frequency states.");
> +       fwts_log_info_verbatum(fw, "  2. Higher advertised frequencies have a higher performance.");
> +       fwts_log_info_verbatum(fw, "  3. No duplicate frequency values are reported by the BIOS.");
> +       fwts_log_info_verbatum(fw, "  4. BIOS doing Sw_All P-state coordination across cores.");
> +       fwts_log_info_verbatum(fw, "  5. BIOS doing Sw_Any P-state coordination across cores.");
> +       fwts_log_nl(fw);
>
>         /* First set all processors to their lowest speed */
>         if ((dir = opendir(FWTS_CPU_PATH)) == NULL) {
> --
> 1.8.1.2
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
index 94f2060..fd37b9d 100644
--- a/src/cpu/cpufreq/cpufreq.c
+++ b/src/cpu/cpufreq/cpufreq.c
@@ -619,13 +619,12 @@  static int cpufreq_test1(fwts_framework *fw)
 		"various frequency states (P-states) that the BIOS advertises "
 		"for the processor. For each processor/frequency combination, "
 		"a quick performance value is measured. The test then validates that:");
-	fwts_log_info_verbatum(fw,
-		"  1) Each processor has the same number of frequency states\n"
-		"  2) Higher advertised frequencies have a higher performance\n"
-		"  3) No duplicate frequency values are reported by the BIOS\n"
-		"  4) Is BIOS wrongly doing Sw_All P-state coordination across cores\n"
-		"  5) Is BIOS wrongly doing Sw_Any P-state coordination across cores\n");
-
+	fwts_log_info_verbatum(fw, "  1. Each processor has the same number of frequency states.");
+	fwts_log_info_verbatum(fw, "  2. Higher advertised frequencies have a higher performance.");
+	fwts_log_info_verbatum(fw, "  3. No duplicate frequency values are reported by the BIOS.");
+	fwts_log_info_verbatum(fw, "  4. BIOS doing Sw_All P-state coordination across cores.");
+	fwts_log_info_verbatum(fw, "  5. BIOS doing Sw_Any P-state coordination across cores.");
+	fwts_log_nl(fw);
 
 	/* First set all processors to their lowest speed */
 	if ((dir = opendir(FWTS_CPU_PATH)) == NULL) {