lkml.org 
[lkml]   [2009]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/2] Make __stringify support variable argument macro
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@cn.fujitsu.com>
---
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



\
 
 \ /
  Last update: 2009-04-08 11:05    [W:2.206 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site