xen/trace: Turn the stub debugtrace_{dump,printk}() macros into functions
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 2 Jul 2016 10:43:02 +0000 (11:43 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 2 Sep 2016 10:19:40 +0000 (11:19 +0100)
This allows printf format checking to be performed, and for
debugtrace_printk() to evaluate its arguments, even if debugtrace is disabled
at compile time.

No intended change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/xen/lib.h

index d04864e12c817b557675759218cd2cdfd85875cb..e518adc6295a7ecb0024039c7c57e513fde60313 100644 (file)
@@ -68,8 +68,10 @@ extern void debugtrace_dump(void);
 extern void debugtrace_printk(const char *fmt, ...)
     __attribute__ ((format (printf, 1, 2)));
 #else
-#define debugtrace_dump()          ((void)0)
-#define debugtrace_printk(_f, ...) ((void)0)
+static inline void debugtrace_dump(void) {}
+static inline void
+ __attribute__ ((format (printf, 1, 2)))
+debugtrace_printk(const char *fmt, ...) {}
 #endif
 
 /* Allows us to use '%p' as general-purpose machine-word format char. */