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: 1afa4c7c5ea6 ("power: fix mapped lcore ID")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/power/power_amd_pstate_cpufreq.c | 2 +-
lib/power/power_common.c | 4 ++--
lib/power/power_pstate_cpufreq.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/power/power_amd_pstate_cpufreq.c b/lib/power/power_amd_pstate_cpufreq.c
index 7b8e77003f..ff63e91183 100644
--- a/lib/power/power_amd_pstate_cpufreq.c
+++ b/lib/power/power_amd_pstate_cpufreq.c
@@ -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;
}
diff --git a/lib/power/power_common.c b/lib/power/power_common.c
index 8ffb49ef8f..ee0c264c8d 100644
--- a/lib/power/power_common.c
+++ b/lib/power/power_common.c
@@ -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;
}
diff --git a/lib/power/power_pstate_cpufreq.c b/lib/power/power_pstate_cpufreq.c
index 890875bd93..fa9ef2aa8a 100644
--- a/lib/power/power_pstate_cpufreq.c
+++ b/lib/power/power_pstate_cpufreq.c
@@ -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;
}
--
2.47.0