[04/12] acpi: apicinstance: use correct format specifiers
diff mbox series

Message ID 20180906142001.28381-5-colin.king@canonical.com
State Accepted
Headers show
Series
  • Fix up print format specifiers
Related show

Commit Message

Colin King Sept. 6, 2018, 2:19 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Don't use casting but instead use the correct format specifiers
to print values.

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

Comments

Alex Hung Sept. 6, 2018, 9:38 p.m. UTC | #1
On 2018-09-06 07:19 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't use casting but instead use the correct format specifiers
> to print values.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/apicinstance/apicinstance.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/acpi/apicinstance/apicinstance.c b/src/acpi/apicinstance/apicinstance.c
> index d6609239..557166f9 100644
> --- a/src/acpi/apicinstance/apicinstance.c
> +++ b/src/acpi/apicinstance/apicinstance.c
> @@ -39,10 +39,10 @@ static int apicinstance_test1(fwts_framework *fw)
>   			break;
>   
>   		if (strcmp(table->name, "APIC") == 0)  {
> -			fwts_log_info(fw, "Found APIC/MADT table %s @ %llx, length 0x%d",
> +			fwts_log_info(fw, "Found APIC/MADT table %s @ %" PRIx64 ", length 0x%zx",
>   				table->name,
> -				(unsigned long long)table->addr,
> -				(int)table->length);
> +				table->addr,
> +				table->length);
>   			if (first_madt_table == NULL)
>   				first_madt_table = table;
>   			else {
> 



Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Sept. 10, 2018, 4:26 a.m. UTC | #2
On 09/06/2018 10:19 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't use casting but instead use the correct format specifiers
> to print values.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/apicinstance/apicinstance.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/acpi/apicinstance/apicinstance.c b/src/acpi/apicinstance/apicinstance.c
> index d6609239..557166f9 100644
> --- a/src/acpi/apicinstance/apicinstance.c
> +++ b/src/acpi/apicinstance/apicinstance.c
> @@ -39,10 +39,10 @@ static int apicinstance_test1(fwts_framework *fw)
>  			break;
>  
>  		if (strcmp(table->name, "APIC") == 0)  {
> -			fwts_log_info(fw, "Found APIC/MADT table %s @ %llx, length 0x%d",
> +			fwts_log_info(fw, "Found APIC/MADT table %s @ %" PRIx64 ", length 0x%zx",
>  				table->name,
> -				(unsigned long long)table->addr,
> -				(int)table->length);
> +				table->addr,
> +				table->length);
>  			if (first_madt_table == NULL)
>  				first_madt_table = table;
>  			else {
Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch
diff mbox series

diff --git a/src/acpi/apicinstance/apicinstance.c b/src/acpi/apicinstance/apicinstance.c
index d6609239..557166f9 100644
--- a/src/acpi/apicinstance/apicinstance.c
+++ b/src/acpi/apicinstance/apicinstance.c
@@ -39,10 +39,10 @@  static int apicinstance_test1(fwts_framework *fw)
 			break;
 
 		if (strcmp(table->name, "APIC") == 0)  {
-			fwts_log_info(fw, "Found APIC/MADT table %s @ %llx, length 0x%d",
+			fwts_log_info(fw, "Found APIC/MADT table %s @ %" PRIx64 ", length 0x%zx",
 				table->name,
-				(unsigned long long)table->addr,
-				(int)table->length);
+				table->addr,
+				table->length);
 			if (first_madt_table == NULL)
 				first_madt_table = table;
 			else {