[v3,07/16] mldev: stop using variadic argument pack extension

Message ID 1708978786-6740-8-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/mldev/rte_mldev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff --git a/lib/mldev/rte_mldev.h b/lib/mldev/rte_mldev.h
index 27e372f..01577bd 100644
--- a/lib/mldev/rte_mldev.h
+++ b/lib/mldev/rte_mldev.h
@@ -146,8 +146,8 @@ 
 extern int rte_ml_dev_logtype;
 #define RTE_LOGTYPE_MLDEV rte_ml_dev_logtype
-#define RTE_MLDEV_LOG(level, fmt, args...) \
-	RTE_LOG_LINE(level, MLDEV, "%s(): " fmt, __func__, ##args)
+#define RTE_MLDEV_LOG(level, ...) \
+	RTE_LOG_LINE_PREFIX(level, MLDEV, "%s(): ", __func__, __VA_ARGS__)
 #define RTE_ML_STR_MAX 128
 /**< Maximum length of name string */