瀏覽代碼

Make __stringify support variable argument macros too

For example:

  __stringify(__entry->irq, __entry->ret)

will now convert it to:

  "REC->irq, REC->ret"

It also still supports single arguments as the old macro did.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <49DC6751.30308@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Zhaolei 16 年之前
父節點
當前提交
8f7c2c3731
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      include/linux/stringify.h

+ 2 - 2
include/linux/stringify.h

@@ -6,7 +6,7 @@
  * converts to "bar".
  * converts to "bar".
  */
  */
 
 
-#define __stringify_1(x)	#x
-#define __stringify(x)		__stringify_1(x)
+#define __stringify_1(x...)	#x
+#define __stringify(x...)	__stringify_1(x)
 
 
 #endif	/* !__LINUX_STRINGIFY_H */
 #endif	/* !__LINUX_STRINGIFY_H */