[v5,06/22] mldev: stop using variadic argument pack extension

Message ID 1709242325-17218-7-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series stop using variadic argument pack extension |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Feb. 29, 2024, 9:31 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(-)
  

Patch

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 */