[PATCH 1/2] allow TP_printk() to have no args

From: Jason Baron
Date: Fri Jun 05 2009 - 14:09:52 EST


This patch allows TP_printk() to take no args. otherwise there is a stray
',' which causes a compile error.

Signed-off-by: Jason Baron <jbaron@xxxxxxxxxx>

---
include/trace/ftrace.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index edb02bc..d861e21 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -114,7 +114,7 @@
#define __entry field

#undef TP_printk
-#define TP_printk(fmt, args...) fmt "\n", args
+#define TP_printk(fmt, ...) fmt "\n", ##__VA_ARGS__

#undef __get_str
#define __get_str(field) ((char *)__entry + __entry->__str_loc_##field)
--
1.6.0.6

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