From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 2/2] xen/trace: Turn the stub debugtrace_{dump, printk}() macros into functions
Date: Thu, 1 Sep 2016 20:21:47 +0100 [thread overview]
Message-ID: <1472757707-11885-2-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1472757707-11885-1-git-send-email-andrew.cooper3@citrix.com>
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>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Tim Deegan <tim@xen.org>
CC: George Dunlap <george.dunlap@eu.citrix.com>
---
xen/include/xen/lib.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index d04864e..0008d63 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -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. */
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-09-01 19:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 19:21 [PATCH 1/2] x86/shadow: More consistent printing for debug messages Andrew Cooper
2016-09-01 19:21 ` Andrew Cooper [this message]
2016-09-02 7:57 ` [PATCH 2/2] xen/trace: Turn the stub debugtrace_{dump, printk}() macros into functions Jan Beulich
2016-09-02 10:00 ` Andrew Cooper
2016-09-02 10:06 ` Jan Beulich
2016-09-02 7:22 ` [PATCH 1/2] x86/shadow: More consistent printing for debug messages Tim Deegan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472757707-11885-2-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=george.dunlap@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).