[PATCH 1/2] Make __stringify support variable argument macro

From: Zhaolei
Date: Wed Apr 08 2009 - 05:02:27 EST


For example:
__stringify(__entry->irq, __entry->ret) will convert it to:
"REC->irq, REC->ret"

It also support single argument as old macro.

Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
---
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 */
--
1.5.5.3


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