Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/power x86_energy_perf_policy: Fix format string in error message

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>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Malaya Kumar Rout and committed by
Len Brown
7446bd61 90a2fe25

+1 -1
+1 -1
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
··· 372 372 for (cpu = 0; cpu <= max_cpu_num; ++cpu) { 373 373 if (CPU_ISSET_S(cpu, cpu_setsize, cpu_selected_set)) 374 374 if (!CPU_ISSET_S(cpu, cpu_setsize, cpu_present_set)) 375 - errx(1, "Requested cpu% is not present", cpu); 375 + errx(1, "Requested cpu%d is not present", cpu); 376 376 } 377 377 } 378 378