diff mbox

[04/18] acpi: fadt: print format using inttypes

Message ID 1348427041-4913-5-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/fadt/fadt.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Keng-Yu Lin Sept. 25, 2012, 10:06 a.m. UTC | #1
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/fadt/fadt.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c
> index 22dc341..e14d7be 100644
> --- a/src/acpi/fadt/fadt.c
> +++ b/src/acpi/fadt/fadt.c
> @@ -28,6 +28,7 @@
>  #include <sys/stat.h>
>  #include <sys/io.h>
>  #include <unistd.h>
> +#include <inttypes.h>
>  #include <string.h>
>
>  static const fwts_acpi_table_fadt *fadt;
> @@ -75,8 +76,8 @@ static int fadt_test1(fwts_framework *fw)
>                 if ((uint64_t)port != fadt->x_pm1a_cnt_blk.address) {
>                         fwts_failed(fw, LOG_LEVEL_MEDIUM,
>                                 "FADTPM1CNTAddrMismatch",
> -                               "32 and 64 bit versions of FADT pm1_cnt address do not match (0x%8.8x vs 0x%16.16llx).",
> -                               port, (unsigned long long int)fadt->x_pm1a_cnt_blk.address);
> +                               "32 and 64 bit versions of FADT pm1_cnt address do not match (0x%8.8x vs 0x%16.16" PRIx64 ").",
> +                               port, fadt->x_pm1a_cnt_blk.address);
>                         fwts_tag_failed(fw, FWTS_TAG_ACPI_BAD_ADDRESS);
>                 }
>                 if (width != fadt->x_pm1a_cnt_blk.register_bit_width) {
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu Oct. 2, 2012, 2:13 a.m. UTC | #2
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/fadt/fadt.c |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c
> index 22dc341..e14d7be 100644
> --- a/src/acpi/fadt/fadt.c
> +++ b/src/acpi/fadt/fadt.c
> @@ -28,6 +28,7 @@
>   #include <sys/stat.h>
>   #include <sys/io.h>
>   #include <unistd.h>
> +#include <inttypes.h>
>   #include <string.h>
>
>   static const fwts_acpi_table_fadt *fadt;
> @@ -75,8 +76,8 @@ static int fadt_test1(fwts_framework *fw)
>   		if ((uint64_t)port != fadt->x_pm1a_cnt_blk.address) {
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
>   				"FADTPM1CNTAddrMismatch",
> -				"32 and 64 bit versions of FADT pm1_cnt address do not match (0x%8.8x vs 0x%16.16llx).",
> -				port, (unsigned long long int)fadt->x_pm1a_cnt_blk.address);
> +				"32 and 64 bit versions of FADT pm1_cnt address do not match (0x%8.8x vs 0x%16.16" PRIx64 ").",
> +				port, fadt->x_pm1a_cnt_blk.address);
>   			fwts_tag_failed(fw, FWTS_TAG_ACPI_BAD_ADDRESS);
>   		}
>   		if (width != fadt->x_pm1a_cnt_blk.register_bit_width) {
>

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

Patch

diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c
index 22dc341..e14d7be 100644
--- a/src/acpi/fadt/fadt.c
+++ b/src/acpi/fadt/fadt.c
@@ -28,6 +28,7 @@ 
 #include <sys/stat.h>
 #include <sys/io.h>
 #include <unistd.h>
+#include <inttypes.h>
 #include <string.h>
 
 static const fwts_acpi_table_fadt *fadt;
@@ -75,8 +76,8 @@  static int fadt_test1(fwts_framework *fw)
 		if ((uint64_t)port != fadt->x_pm1a_cnt_blk.address) {
 			fwts_failed(fw, LOG_LEVEL_MEDIUM,
 				"FADTPM1CNTAddrMismatch",
-				"32 and 64 bit versions of FADT pm1_cnt address do not match (0x%8.8x vs 0x%16.16llx).",
-				port, (unsigned long long int)fadt->x_pm1a_cnt_blk.address);
+				"32 and 64 bit versions of FADT pm1_cnt address do not match (0x%8.8x vs 0x%16.16" PRIx64 ").",
+				port, fadt->x_pm1a_cnt_blk.address);
 			fwts_tag_failed(fw, FWTS_TAG_ACPI_BAD_ADDRESS);
 		}
 		if (width != fadt->x_pm1a_cnt_blk.register_bit_width) {