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 23.11 LTS branch.
The POWER_LOG() macro in the main branch automatically appends a \n
which is not done by RTE_LOG().

Fixes: 1afa4c7 ("power: fix mapped lcore ID")

Signed-off-by: David Marchand <[email protected]>
  • Loading branch information
david-marchand authored and steevenlee committed Dec 12, 2024
1 parent 425f5c7 commit 7715edd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/power/power_amd_pstate_cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ power_amd_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
4 changes: 2 additions & 2 deletions lib/power/power_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ 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", lcore_id,
CPU_COUNT(&lcore_cpus));
RTE_LOG(ERR, POWER, "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_pstate_cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,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 7715edd

Please sign in to comment.