[PATCH v4 19/22] graph: stop using variadic argument pack extension

Tyler Retzlaff roretzla at linux.microsoft.com
Thu Feb 29 20:53:50 CET 2024


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 at linux.microsoft.com>
---
 lib/graph/graph_private.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/graph/graph_private.h b/lib/graph/graph_private.h
index fb88d4b..73c0884 100644
--- a/lib/graph/graph_private.h
+++ b/lib/graph/graph_private.h
@@ -21,9 +21,8 @@
 #define RTE_LOGTYPE_GRAPH rte_graph_logtype
 
 #define GRAPH_LOG(level, ...)                                                  \
-	RTE_LOG_LINE(level, GRAPH,                                             \
-		RTE_FMT("%s():%u " RTE_FMT_HEAD(__VA_ARGS__ ,),                \
-			__func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__ ,)))
+	RTE_LOG_LINE_PREFIX(level, GRAPH, \
+		"%s():%u ", __func__ RTE_LOG_COMMA __LINE__, __VA_ARGS__)
 
 #define graph_err(...) GRAPH_LOG(ERR, __VA_ARGS__)
 #define graph_warn(...) GRAPH_LOG(WARNING, __VA_ARGS__)
-- 
1.8.3.1



More information about the dev mailing list