[10/12] acpi/method: use inttype.h print format size specifiers
diff mbox series

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

Commit Message

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

Use the correct size specifiers for the specific types.

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

Comments

Alex Hung Sept. 6, 2018, 9:39 p.m. UTC | #1
On 2018-09-06 07:19 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Use the correct size specifiers for the specific types.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/method/method.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index c42ec02d..7d5311e0 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -2400,7 +2400,7 @@ static void method_test_PSS_return(
>   	 */
>   	if (max_freq_valid && max_freq < 1000) {
>   		fwts_failed(fw, LOG_LEVEL_LOW, "Method_PSSSubPackageLowFreq",
> -			"Maximum CPU frequency is %dHz and this is low for "
> +			"Maximum CPU frequency is %" PRIu32 "Hz and this is low for "
>   			"a modern processor. This may indicate the _PSS "
>   			"P-States are incorrect\n", max_freq);
>   		fwts_advice(fw,
> @@ -5493,7 +5493,7 @@ static void method_test_BCL_return(
>   				"Brightness level %" PRIu64
>   				" (index %" PRIu32 ") is greater "
>   				"than brightness level %" PRIu64
> -				" (index %d" PRIu32 "), should "
> +				" (index %" PRIu32 "), should "
>   				"be in ascending order.",
>   				(uint64_t)obj->Package.Elements[i].Integer.Value, i,
>   				(uint64_t)obj->Package.Elements[i+1].Integer.Value, i+1);
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Sept. 10, 2018, 4:29 a.m. UTC | #2
On 09/06/2018 10:19 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Use the correct size specifiers for the specific types.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/method/method.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index c42ec02d..7d5311e0 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -2400,7 +2400,7 @@ static void method_test_PSS_return(
>  	 */
>  	if (max_freq_valid && max_freq < 1000) {
>  		fwts_failed(fw, LOG_LEVEL_LOW, "Method_PSSSubPackageLowFreq",
> -			"Maximum CPU frequency is %dHz and this is low for "
> +			"Maximum CPU frequency is %" PRIu32 "Hz and this is low for "
>  			"a modern processor. This may indicate the _PSS "
>  			"P-States are incorrect\n", max_freq);
>  		fwts_advice(fw,
> @@ -5493,7 +5493,7 @@ static void method_test_BCL_return(
>  				"Brightness level %" PRIu64
>  				" (index %" PRIu32 ") is greater "
>  				"than brightness level %" PRIu64
> -				" (index %d" PRIu32 "), should "
> +				" (index %" PRIu32 "), should "
>  				"be in ascending order.",
>  				(uint64_t)obj->Package.Elements[i].Integer.Value, i,
>  				(uint64_t)obj->Package.Elements[i+1].Integer.Value, i+1);
Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch
diff mbox series

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index c42ec02d..7d5311e0 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -2400,7 +2400,7 @@  static void method_test_PSS_return(
 	 */
 	if (max_freq_valid && max_freq < 1000) {
 		fwts_failed(fw, LOG_LEVEL_LOW, "Method_PSSSubPackageLowFreq",
-			"Maximum CPU frequency is %dHz and this is low for "
+			"Maximum CPU frequency is %" PRIu32 "Hz and this is low for "
 			"a modern processor. This may indicate the _PSS "
 			"P-States are incorrect\n", max_freq);
 		fwts_advice(fw,
@@ -5493,7 +5493,7 @@  static void method_test_BCL_return(
 				"Brightness level %" PRIu64
 				" (index %" PRIu32 ") is greater "
 				"than brightness level %" PRIu64
-				" (index %d" PRIu32 "), should "
+				" (index %" PRIu32 "), should "
 				"be in ascending order.",
 				(uint64_t)obj->Package.Elements[i].Integer.Value, i,
 				(uint64_t)obj->Package.Elements[i+1].Integer.Value, i+1);