Skip to content

Commit

Permalink
power: fix log message when checking lcore ID
Browse files Browse the repository at this point in the history
Caught while inspecting changes backported in 22.11 LTS branch.
The POWER_LOG() macro in the main branch automatically appends a \n
which is not done by RTE_LOG().

Fixes: a73f3a9 ("power: fix mapped lcore ID")

Signed-off-by: David Marchand <[email protected]>
  • Loading branch information
david-marchand authored and bluca committed Dec 9, 2024
1 parent 077a704 commit d752210
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/power/power_acpi_cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ power_acpi_cpufreq_init(unsigned int lcore_id)
}

if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u\n", lcore_id);
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/power/power_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ int power_get_lcore_mapped_cpu_id(uint32_t lcore_id, uint32_t *cpu_id)
lcore_cpus = rte_lcore_cpuset(lcore_id);
if (CPU_COUNT(&lcore_cpus) != 1) {
RTE_LOG(ERR, POWER,
"Power library does not support lcore %u mapping to %u CPUs",
"Power library does not support lcore %u mapping to %u CPUs\n",
lcore_id, CPU_COUNT(&lcore_cpus));
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/power/power_cppc_cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ power_cppc_cpufreq_init(unsigned int lcore_id)
}

if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u\n", lcore_id);
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/power/power_pstate_cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
}

if (power_get_lcore_mapped_cpu_id(lcore_id, &pi->lcore_id) < 0) {
RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u", lcore_id);
RTE_LOG(ERR, POWER, "Cannot get CPU ID mapped for lcore %u\n", lcore_id);
return -1;
}

Expand Down

0 comments on commit d752210

Please sign in to comment.