Skip to contentSkip to conversation

ia64: fix format string for ia64-acpi-cpu-freq

PATCH Applied Sergei Trofimovich 3 participants 3 messages Mar 13, 2021 – Mar 19, 2021 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64: fix format string for ia64-acpi-cpu-freq

Fix warning with %lx / s64 mismatch:

CC [M] drivers/cpufreq/ia64-acpi-cpufreq.o
drivers/cpufreq/ia64-acpi-cpufreq.c: In function 'processor_get_pstate':
warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 's64' {aka 'long long int'} [-Wformat=]

---
 drivers/cpufreq/ia64-acpi-cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/ia64-acpi-cpufreq.c +2 -2
index 2efe7189ccc4..c6bdc455517f 100644
@@ -54,7 +54,7 @@ processor_set_pstate (
 	retval = ia64_pal_set_pstate((u64)value);
 
 	if (retval) {
-		pr_debug("Failed to set freq to 0x%x, with error 0x%lx\n",
+		pr_debug("Failed to set freq to 0x%x, with error 0x%llx\n",
 		        value, retval);
 		return -ENODEV;
 	}
@@ -77,7 +77,7 @@ processor_get_pstate (
 
 	if (retval)
 		pr_debug("Failed to get current freq with "
-			"error 0x%lx, idx 0x%x\n", retval, *value);
+			"error 0x%llx, idx 0x%x\n", retval, *value);
 
 	return (int)retval;
 }
Signature · 1 line
2.30.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 29 lines · Sergei Trofimovich

Fix warning with %lx / s64 mismatch:

CC [M] drivers/cpufreq/ia64-acpi-cpufreq.o
drivers/cpufreq/ia64-acpi-cpufreq.c: In function 'processor_get_pstate':
warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 's64' {aka 'long long int'} [-Wformat=]

---
 drivers/cpufreq/ia64-acpi-cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/ia64-acpi-cpufreq.c +1 -1
index 2efe7189ccc4..c6bdc455517f 100644
@@ -54,7 +54,7 @@ processor_set_pstate (
 	retval = ia64_pal_set_pstate((u64)value);
 
 	if (retval) {
-		pr_debug("Failed to set freq to 0x%x, with error 0x%lx\n",
+		pr_debug("Failed to set freq to 0x%x, with error 0x%llx\n",
 		        value, retval);
 		return -ENODEV;
 	}

drivers/cpufreq/ia64-acpi-cpufreq.c processor_get_pstate ( · line 83

Quoted 8 lines
drivers/cpufreq/ia64-acpi-cpufreq.c +1 -1
@@ -77,7 +77,7 @@ processor_get_pstate (
 
 	if (retval)
 		pr_debug("Failed to get current freq with "
-			"error 0x%lx, idx 0x%x\n", retval, *value);
+			"error 0x%llx, idx 0x%x\n", retval, *value);
 
 	return (int)retval;
 }
Signature · 1 line
viresh
maintainer Applied
#2 lore raw
Quoted 37 lines · Viresh Kumar
Quoted 35 lines · Sergei Trofimovich

Fix warning with %lx / s64 mismatch:

CC [M] drivers/cpufreq/ia64-acpi-cpufreq.o
drivers/cpufreq/ia64-acpi-cpufreq.c: In function 'processor_get_pstate':
warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 's64' {aka 'long long int'} [-Wformat=]

---
 drivers/cpufreq/ia64-acpi-cpufreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/cpufreq/ia64-acpi-cpufreq.c +2 -2
index 2efe7189ccc4..c6bdc455517f 100644
@@ -54,7 +54,7 @@ processor_set_pstate (
      retval = ia64_pal_set_pstate((u64)value);
 
      if (retval) {
-             pr_debug("Failed to set freq to 0x%x, with error 0x%lx\n",
+             pr_debug("Failed to set freq to 0x%x, with error 0x%llx\n",
                      value, retval);
              return -ENODEV;
      }
@@ -77,7 +77,7 @@ processor_get_pstate (
 
      if (retval)
              pr_debug("Failed to get current freq with "
-                     "error 0x%lx, idx 0x%x\n", retval, *value);
+                     "error 0x%llx, idx 0x%x\n", retval, *value);
 
Quoted 4 lines

drivers/cpufreq/ia64-acpi-cpufreq.c processor_get_pstate ( · line 83

Quoted 2 lines
drivers/cpufreq/ia64-acpi-cpufreq.c +0 -0
      return (int)retval;
 }

Applied as 5.13 material, thanks!