Patchwork [3/3] bios: mtrr: strip off trailing newlines

login
register
mail settings
Submitter Colin King
Date May 29, 2012, 1:11 p.m.
Message ID <1338297111-19168-4-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/161743/
State Accepted
Headers show

Comments

Colin King - May 29, 2012, 1:11 p.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/bios/mtrr/mtrr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Alex Hung - May 29, 2012, 2:16 p.m.
On 05/29/2012 09:11 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   src/bios/mtrr/mtrr.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index 4914399..9e674a3 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -505,17 +505,17 @@ static void do_mtrr_resource(fwts_framework *fw)
>   	fwts_list_foreach(item, mtrr_list) {
>   		entry = fwts_list_data(struct mtrr_entry *, item);
>   		if (entry->type&  DISABLED)
> -			fwts_log_info_verbatum(fw, "Reg %hhu: disabled\n", entry->reg);
> +			fwts_log_info_verbatum(fw, "Reg %hhu: disabled", entry->reg);
>   		else
>   			fwts_log_info_verbatum(fw,
> -				"Reg %hhu: 0x%16.16llx - 0x%16.16llx (%6lld %cB)  %s \n",
> +				"Reg %hhu: 0x%16.16llx - 0x%16.16llx (%6lld %cB)  %s",
>   				entry->reg,
>   				(unsigned long long int)entry->start,
>   				(unsigned long long int)entry->end,
>   				(unsigned long long int)(entry->size>= (1024*1024) ? entry->size / (1024*1024) : (entry->size / 1024)),
>   				entry->size>= (1024*1024) ? 'M' : 'K', cache_to_string(entry->type));
>   	}
> -	fwts_log_info(fw,"\n");
> +	fwts_log_nl(fw);
>   }
>
>   static int mtrr_init(fwts_framework *fw)
Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - May 31, 2012, 6:57 a.m.
On Tue, May 29, 2012 at 9:11 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/bios/mtrr/mtrr.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index 4914399..9e674a3 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -505,17 +505,17 @@ static void do_mtrr_resource(fwts_framework *fw)
>        fwts_list_foreach(item, mtrr_list) {
>                entry = fwts_list_data(struct mtrr_entry *, item);
>                if (entry->type & DISABLED)
> -                       fwts_log_info_verbatum(fw, "Reg %hhu: disabled\n", entry->reg);
> +                       fwts_log_info_verbatum(fw, "Reg %hhu: disabled", entry->reg);
>                else
>                        fwts_log_info_verbatum(fw,
> -                               "Reg %hhu: 0x%16.16llx - 0x%16.16llx (%6lld %cB)  %s \n",
> +                               "Reg %hhu: 0x%16.16llx - 0x%16.16llx (%6lld %cB)  %s",
>                                entry->reg,
>                                (unsigned long long int)entry->start,
>                                (unsigned long long int)entry->end,
>                                (unsigned long long int)(entry->size >= (1024*1024) ? entry->size / (1024*1024) : (entry->size / 1024)),
>                                entry->size >= (1024*1024) ? 'M' : 'K', cache_to_string(entry->type));
>        }
> -       fwts_log_info(fw,"\n");
> +       fwts_log_nl(fw);
>  }
>
>  static int mtrr_init(fwts_framework *fw)
> --
> 1.7.10
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - June 1, 2012, 1:43 a.m.
On 05/29/2012 09:11 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   src/bios/mtrr/mtrr.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index 4914399..9e674a3 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -505,17 +505,17 @@ static void do_mtrr_resource(fwts_framework *fw)
>   	fwts_list_foreach(item, mtrr_list) {
>   		entry = fwts_list_data(struct mtrr_entry *, item);
>   		if (entry->type&  DISABLED)
> -			fwts_log_info_verbatum(fw, "Reg %hhu: disabled\n", entry->reg);
> +			fwts_log_info_verbatum(fw, "Reg %hhu: disabled", entry->reg);
>   		else
>   			fwts_log_info_verbatum(fw,
> -				"Reg %hhu: 0x%16.16llx - 0x%16.16llx (%6lld %cB)  %s \n",
> +				"Reg %hhu: 0x%16.16llx - 0x%16.16llx (%6lld %cB)  %s",
>   				entry->reg,
>   				(unsigned long long int)entry->start,
>   				(unsigned long long int)entry->end,
>   				(unsigned long long int)(entry->size>= (1024*1024) ? entry->size / (1024*1024) : (entry->size / 1024)),
>   				entry->size>= (1024*1024) ? 'M' : 'K', cache_to_string(entry->type));
>   	}
> -	fwts_log_info(fw,"\n");
> +	fwts_log_nl(fw);
>   }
>
>   static int mtrr_init(fwts_framework *fw)
Acked-by: Ivan Hu<ivan.hu@canonical.com>

Patch

diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
index 4914399..9e674a3 100644
--- a/src/bios/mtrr/mtrr.c
+++ b/src/bios/mtrr/mtrr.c
@@ -505,17 +505,17 @@  static void do_mtrr_resource(fwts_framework *fw)
 	fwts_list_foreach(item, mtrr_list) {
 		entry = fwts_list_data(struct mtrr_entry *, item);
 		if (entry->type & DISABLED)
-			fwts_log_info_verbatum(fw, "Reg %hhu: disabled\n", entry->reg);
+			fwts_log_info_verbatum(fw, "Reg %hhu: disabled", entry->reg);
 		else
 			fwts_log_info_verbatum(fw,
-				"Reg %hhu: 0x%16.16llx - 0x%16.16llx (%6lld %cB)  %s \n",
+				"Reg %hhu: 0x%16.16llx - 0x%16.16llx (%6lld %cB)  %s",
 				entry->reg,
 				(unsigned long long int)entry->start,
 				(unsigned long long int)entry->end,
 				(unsigned long long int)(entry->size >= (1024*1024) ? entry->size / (1024*1024) : (entry->size / 1024)),
 				entry->size >= (1024*1024) ? 'M' : 'K', cache_to_string(entry->type));
 	}
-	fwts_log_info(fw,"\n");
+	fwts_log_nl(fw);
 }
 
 static int mtrr_init(fwts_framework *fw)