[tip:tracing/urgent] Make __stringify support variable argument macros too

From: Zhaolei
Date: Fri Apr 10 2009 - 10:07:34 EST


Commit-ID: 8f7c2c37319a81ef4c2bfdec67b1ccd5744d97e4
Gitweb: http://git.kernel.org/tip/8f7c2c37319a81ef4c2bfdec67b1ccd5744d97e4
Author: Zhaolei <zhaolei@xxxxxxxxxxxxxx>
AuthorDate: Wed, 8 Apr 2009 16:58:57 +0800
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Fri, 10 Apr 2009 15:48:52 +0200

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@xxxxxxxxxxxxxx>
Acked-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
LKML-Reference: <49DC6751.30308@xxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
include/linux/stringify.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/stringify.h b/include/linux/stringify.h
index 0b43883..841cec8 100644
--- a/include/linux/stringify.h
+++ b/include/linux/stringify.h
@@ -6,7 +6,7 @@
* 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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/