[11/15] power: use GCC and MSVC common VA ARGS extension

Message ID 1707774557-16012-12-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series use GCC/MSVC compatible __VA_ARGS__ |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Feb. 12, 2024, 9:49 p.m. UTC
  Use ... and forward with __VA_ARGS__ instead of args... and args.
Neither mechanism is conformant with the standard but the former works
with both GCC and MSVC.

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

Patch

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