[v2,08/17] net: stop using variadic argument pack extension

Message ID 1708645606-7514-9-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. 22, 2024, 11:46 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/net/rte_net_crc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff --git a/lib/net/rte_net_crc.c b/lib/net/rte_net_crc.c
index b401ea3..346c285 100644
--- a/lib/net/rte_net_crc.c
+++ b/lib/net/rte_net_crc.c
@@ -73,8 +73,8 @@ 
 #define RTE_LOGTYPE_NET libnet_logtype
-#define NET_LOG(level, fmt, args...) \
-	RTE_LOG_LINE(level, NET, "%s(): " fmt, __func__, ## args)
+#define NET_LOG(level, ...) \
+	RTE_LOG_LINE_PREFIX(level, NET, "%s(): ", __func__, __VA_ARGS__)
 /* Scalar handling */