qemu-devel
[Top][All Lists]
Advanced

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

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


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v3 02/16] x86: Convert debug printfs to QEMU_DPRINTF
Date: Mon, 19 May 2014 09:48:13 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

[resend, because I got:

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

I think it was complaining about:
CC: open list:X86 <address@hidden>
CC: open list:X86 <address@hidden>

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í <address@hidden>
> ---
>  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 <address@hidden>

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



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]