Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zhaolei and committed by
Ingo Molnar
8f7c2c37 4d1f4372

+2 -2
+2 -2
include/linux/stringify.h
··· 6 6 * converts to "bar". 7 7 */ 8 8 9 - #define __stringify_1(x) #x 10 - #define __stringify(x) __stringify_1(x) 9 + #define __stringify_1(x...) #x 10 + #define __stringify(x...) __stringify_1(x) 11 11 12 12 #endif /* !__LINUX_STRINGIFY_H */