[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Qemu-devel] [PATCH v3 02/16] x86: Convert debug printfs to QEMU_DPRINTF



On 05/17/2014 05:03 PM, Marc Marà wrote:
> Modify debug macros to have the same format through the codebase and use 
> regular
> ifs instead of ifdef.
> 
> Signed-off-by: Marc Marà <marc.mari.barcelo@xxxxxxxxx>
> ---
>  hw/i386/kvm/pci-assign.c |   11 ++++++-----
>  hw/i386/multiboot.c      |    7 +++++--
>  target-i386/kvm.c        |    9 +++++----
>  xen-hvm.c                |    9 +++++----
>  xen-mapcache.c           |    9 +++++----
>  5 files changed, 26 insertions(+), 19 deletions(-)
> 

>  #ifdef DEVICE_ASSIGNMENT_DEBUG
> -#define DEBUG(fmt, ...)                                       \
> -    do {                                                      \
> -        fprintf(stderr, "%s: " fmt, __func__ , __VA_ARGS__);  \
> -    } while (0)
> +#define DEVICE_ASSIGNMENT_DEBUG_ENABLED 1
>  #else
> -#define DEBUG(fmt, ...)
> +#define DEVICE_ASSIGNMENT_DEBUG_ENABLED 0
>  #endif
>  
> +#define DEBUG(fmt, ...) \
> +    QEMU_DPRINTF(DEVICE_ASSIGNMENT_DEBUG_ENABLED, \
> +                "pci_assign", fmt, ## __VA_ARGS__)
> +

Style - you are replacing aligned \ continuation with one-space \
continuation.  I don't know if we have a distinct preference, but it's
probably better to leave the style unchanged if checkpatch.pl doesn't
complain about either way.

As that's minor,

Reviewed-by: Eric Blake <eblake@xxxxxxxxxx>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.