mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tools/power x86_energy_perf_policy: Fix format string in error message
@ 2025-11-22 13:44 Malaya Kumar Rout
  0 siblings, 0 replies; only message in thread
From: Malaya Kumar Rout @ 2025-11-22 13:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: mrout, malayarout91, Len Brown, Kaushlendra Kumar

The error message in validate_cpu_selected_set() uses an incomplete
format specifier "cpu%" instead of "cpu%d", resulting in the error
message printing "Requested cpu% is not present" rather than
showing the actual CPU number.

Fix the format string to properly display the CPU number.

Signed-off-by: Malaya Kumar Rout <mrout@redhat.com>
---
 tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
index 884a4c746f32..3e002f0bd65c 100644
--- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
+++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
@@ -370,7 +370,7 @@ void validate_cpu_selected_set(void)
 	for (cpu = 0; cpu <= max_cpu_num; ++cpu) {
 		if (CPU_ISSET_S(cpu, cpu_setsize, cpu_selected_set))
 			if (!CPU_ISSET_S(cpu, cpu_setsize, cpu_present_set))
-				errx(1, "Requested cpu% is not present", cpu);
+				errx(1, "Requested cpu%d is not present", cpu);
 	}
 }
 
-- 
2.51.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-22 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-22 13:44 [PATCH] tools/power x86_energy_perf_policy: Fix format string in error message Malaya Kumar Rout

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®