[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/argo: Fixes to argo_dprintk()
commit d33ccc98750aed4168df44c9a3274e24b49e2aec Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Fri Oct 14 14:39:55 2022 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri Mar 24 12:16:31 2023 +0000 xen/argo: Fixes to argo_dprintk() Rewrite argo_dprintk() so printk() format typechecking can always be performed. This also fixes the fact that parameters are not evaulated at all in the default case. Emit the messages at XENLOG_DEBUG. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx> --- xen/common/argo.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/xen/common/argo.c b/xen/common/argo.c index 9ad2ecaa1e..f29fa720fc 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -313,14 +313,12 @@ static DEFINE_RWLOCK(L1_global_argo_rwlock); /* L1 */ ((LOCKING_Read_L1 && spin_is_locked(&(d)->argo->send_L2_lock)) || \ LOCKING_Write_L1) -/* Change this to #define ARGO_DEBUG here to enable more debug messages */ -#undef ARGO_DEBUG - -#ifdef ARGO_DEBUG -#define argo_dprintk(format, args...) printk("argo: " format, ## args ) -#else -#define argo_dprintk(format, ... ) ((void)0) -#endif +#define ARGO_DEBUG 0 +#define argo_dprintk(fmt, args...) \ + do { \ + if ( ARGO_DEBUG ) \ + printk(XENLOG_DEBUG "argo: " fmt, ##args); \ + } while ( 0 ) /* * This hash function is used to distribute rings within the per-domain -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |