Skip to content

Commit

Permalink
Make __stringify support variable argument macros too
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhaoleidd authored and Ingo Molnar committed Apr 10, 2009
1 parent 4d1f437 commit 8f7c2c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/stringify.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 8f7c2c3

Please sign in to comment.