Patchwork [03/18] acpi: checksum: print format using inttypes

login
register
mail settings
Submitter Colin King
Date Sept. 23, 2012, 7:03 p.m.
Message ID <1348427041-4913-4-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/186255/
State Accepted
Headers show

Comments

Colin King - Sept. 23, 2012, 7:03 p.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/checksum/checksum.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Keng-Yu Lin - Sept. 25, 2012, 10:05 a.m.
On Mon, Sep 24, 2012 at 3:03 AM, 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/acpi/checksum/checksum.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c
> index 6e937ec..6080c37 100644
> --- a/src/acpi/checksum/checksum.c
> +++ b/src/acpi/checksum/checksum.c
> @@ -34,8 +34,8 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
>         if (table->length < 20) {
>                 fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableCheckSumShortRSDP",
>                         "RSDP was expected to be at least 20 bytes long, "
> -                       "got a shortened size of %d bytes.",
> -                       (int)table->length);
> +                       "got a shortened size of %zd bytes.",
> +                       table->length);
>                 /* Won't test on a short RSDP */
>                 return;
>         }
> @@ -47,7 +47,7 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
>                         "RSDP has incorrect checksum, expected 0x%2.2x, "
>                         "got 0x%2.2x.",
>                         (uint8_t)(rsdp->checksum)-checksum, rsdp->checksum);
> -               fwts_advice(fw,
> +               fwts_advice(fw,
>                         "The kernel will not load the RSDP with an "
>                         "invalid checksum and hence all other ACPI "
>                         "tables will also fail to load.");
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - Oct. 2, 2012, 2:12 a.m.
On 09/24/2012 03:03 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/checksum/checksum.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c
> index 6e937ec..6080c37 100644
> --- a/src/acpi/checksum/checksum.c
> +++ b/src/acpi/checksum/checksum.c
> @@ -34,8 +34,8 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
>   	if (table->length < 20) {
>   		fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableCheckSumShortRSDP",
>   			"RSDP was expected to be at least 20 bytes long, "
> -			"got a shortened size of %d bytes.",
> -			(int)table->length);
> +			"got a shortened size of %zd bytes.",
> +			table->length);
>   		/* Won't test on a short RSDP */
>   		return;
>   	}
> @@ -47,7 +47,7 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
>   			"RSDP has incorrect checksum, expected 0x%2.2x, "
>   			"got 0x%2.2x.",
>   			(uint8_t)(rsdp->checksum)-checksum, rsdp->checksum);
> -		fwts_advice(fw,
> +		fwts_advice(fw,
>   			"The kernel will not load the RSDP with an "
>   			"invalid checksum and hence all other ACPI "
>   			"tables will also fail to load.");
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c
index 6e937ec..6080c37 100644
--- a/src/acpi/checksum/checksum.c
+++ b/src/acpi/checksum/checksum.c
@@ -34,8 +34,8 @@  static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
 	if (table->length < 20) {
 		fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableCheckSumShortRSDP",
 			"RSDP was expected to be at least 20 bytes long, "
-			"got a shortened size of %d bytes.",
-			(int)table->length);
+			"got a shortened size of %zd bytes.",
+			table->length);
 		/* Won't test on a short RSDP */
 		return;
 	}
@@ -47,7 +47,7 @@  static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
 			"RSDP has incorrect checksum, expected 0x%2.2x, "
 			"got 0x%2.2x.",
 			(uint8_t)(rsdp->checksum)-checksum, rsdp->checksum);
-		fwts_advice(fw, 
+		fwts_advice(fw,
 			"The kernel will not load the RSDP with an "
 			"invalid checksum and hence all other ACPI "
 			"tables will also fail to load.");