Skip to content

Commit 53cfe8a

Browse files
dozylynxandyhhp
authored andcommitted
argo: define argo_dprintk for subsystem debugging
A convenience for working on development of the argo subsystem: setting a #define variable enables additional debug messages. Signed-off-by: Christopher Clark <[email protected]> Acked-by: Jan Beulich <[email protected]> Reviewed-by: Roger Pau Monné <[email protected]> === Jan's further remark given with the Ack: "This would better be an inline function, such that arguments passed in actually get evaluated. Otherwise you risk overlooking variables used for such logging only, and in particular the compiler then issuing warnings (breaking the build due to -Werror)." v3 added Roger's Reviewed-by v3 added Jan's Ack v2 xen-project#3 feedback, Jan: fix ifdef/define confusion error v1 xen-project#4 feedback, Jan: fix dprintk implementation
1 parent 0a17259 commit 53cfe8a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

xen/common/argo.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
#include <xen/errno.h>
2020
#include <xen/guest_access.h>
2121

22+
/* Change this to #define ARGO_DEBUG here to enable more debug messages */
23+
#undef ARGO_DEBUG
24+
25+
#ifdef ARGO_DEBUG
26+
#define argo_dprintk(format, args...) printk("argo: " format, ## args )
27+
#else
28+
#define argo_dprintk(format, ... ) ((void)0)
29+
#endif
30+
2231
long
2332
do_argo_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) arg1,
2433
XEN_GUEST_HANDLE_PARAM(void) arg2, unsigned long arg3,

0 commit comments

Comments
 (0)