[v3,10/16] power: stop using variadic argument pack extension

Message ID 1708978786-6740-11-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Series stop using variadic argument pack extension |


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Feb. 26, 2024, 8:19 p.m. UTC
  Use RTE_LOG_LINE_PREFIX instead of RTE_LOG_LINE in macro expansions
which allow a prefix and arguments to be inserted into the log line
without the need to use the ## args variadic argument pack extension.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
 lib/power/power_common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


diff --git a/lib/power/power_common.h b/lib/power/power_common.h
index 3096640..77bc593 100644
--- a/lib/power/power_common.h
+++ b/lib/power/power_common.h
@@ -16,10 +16,10 @@ 
 	RTE_LOG_LINE(level, POWER, "" __VA_ARGS__)
-#define POWER_DEBUG_LOG(fmt, args...) \
-	RTE_LOG_LINE(ERR, POWER, "%s: " fmt, __func__, ## args)
+#define POWER_DEBUG_LOG(...) \
+	RTE_LOG_LINE_PREFIX(ERR, POWER, "%s(): ", __func__, __VA_ARGS__)
-#define POWER_DEBUG_LOG(fmt, args...)
+#define POWER_DEBUG_LOG(fmt, ...)
 /* check if scaling driver matches one we want */