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

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

 



[resend, because I got:

   ----- The following addresses had permanent fatal errors -----
<qemu-devel@xxxxxxxxxx>
    (reason: 550 Invalid address in message header)

I think it was complaining about:
CC: open list:X86 <xen-devel@xxxxxxxxxxxxxxxxxxx>
CC: open list:X86 <kvm@xxxxxxxxxxxxxxx>

where the RFCs say you should enclose : inside "", as in:

CC: "open list:X86" <...>

to be fully compliant.]

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux