qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/38] ivshmem: Compile debug prints uncondition


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH 10/38] ivshmem: Compile debug prints unconditionally to prevent bit-rot
Date: Tue, 1 Mar 2016 13:22:40 +0100

On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster <address@hidden> wrote:
> Signed-off-by: Markus Armbruster <address@hidden>
> ---

Reviewed-by: Marc-André Lureau <address@hidden>

(apparently, there are other places in qemu where this conversion could be done)

>  hw/misc/ivshmem.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
> index b74b02c..395f357 100644
> --- a/hw/misc/ivshmem.c
> +++ b/hw/misc/ivshmem.c
> @@ -48,13 +48,13 @@
>
>  #define IVSHMEM_REG_BAR_SIZE 0x100
>
> -//#define DEBUG_IVSHMEM
> -#ifdef DEBUG_IVSHMEM
> -#define IVSHMEM_DPRINTF(fmt, ...)        \
> -    do {printf("IVSHMEM: " fmt, ## __VA_ARGS__); } while (0)
> -#else
> -#define IVSHMEM_DPRINTF(fmt, ...)
> -#endif
> +#define IVSHMEM_DEBUG 0
> +#define IVSHMEM_DPRINTF(fmt, ...)                       \
> +    do {                                                \
> +        if (IVSHMEM_DEBUG) {                            \
> +            printf("IVSHMEM: " fmt, ## __VA_ARGS__);    \
> +        }                                               \
> +    } while (0)
>
>  #define TYPE_IVSHMEM "ivshmem"
>  #define IVSHMEM(obj) \
> --
> 2.4.3
>
>



-- 
Marc-André Lureau



reply via email to

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