[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 15/16] pci-host: Convert conditional compilat
From: |
Marc Marí |
Subject: |
Re: [Qemu-devel] [PATCH v2 15/16] pci-host: Convert conditional compilation of debug printfs to regular ifs |
Date: |
Tue, 13 May 2014 11:13:27 +0200 |
El Tue, 13 May 2014 09:02:51 +0200
Marc Marí <address@hidden> escribió:
> diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c
> index c80b7cb..dfeb19e 100644
> --- a/hw/pci-host/ppce500.c
> +++ b/hw/pci-host/ppce500.c
> @@ -21,12 +21,16 @@
> #include "qemu/bswap.h"
> #include "hw/pci-host/ppce500.h"
>
> +//#define DEBUG_PCI
> +
> #ifdef DEBUG_PCI
> -#define pci_debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
> +#define DEBUG_PCI_ENABLED 1
> #else
> -#define pci_debug(fmt, ...)
> +#define DEBUG_PCI_ENABLED 0
> #endif
>
> +#define pci_debug(fmt, ...) QEMU_DPRINTF(DEBUG_PCI_ENABLED,
> "ppce500", fmt, ## __VA_ARGS__) +
> #define PCIE500_CFGADDR 0x0
> #define PCIE500_CFGDATA 0x4
> #define PCIE500_REG_BASE 0xC00
In this file, the function name is already written to the macro, so now
it will appear two times. The calls to the macro can be changed to not
add the function name, which, in my opinion, is a bit nicer.
Marc
- Re: [Qemu-devel] [PATCH v2 08/16] tpm: Convert conditional compilation of debug printfs to regular ifs, (continued)
- [Qemu-devel] [PATCH v2 09/16] i82374: Convert conditional compilation of debug printfs to regular ifs, Marc Marí, 2014/05/13
- [Qemu-devel] [PATCH v2 11/16] rc4030: Convert conditional compilation of debug printfs to regular ifs, Marc Marí, 2014/05/13
- [Qemu-devel] [PATCH v2 10/16] i8257: Convert conditional compilation of debug printfs to regular ifs, Marc Marí, 2014/05/13
- [Qemu-devel] [PATCH v2 12/16] sd: Convert conditional compilation of debug printfs to regular ifs, Marc Marí, 2014/05/13
- [Qemu-devel] [PATCH v2 13/16] isa: Convert conditional compilation of debug printfs to regular ifs, Marc Marí, 2014/05/13
- [Qemu-devel] [PATCH v2 14/16] lan9118: Convert conditional compilation of debug printfs to regular ifs, Marc Marí, 2014/05/13
- [Qemu-devel] [PATCH v2 15/16] pci-host: Convert conditional compilation of debug printfs to regular ifs, Marc Marí, 2014/05/13
- Re: [Qemu-devel] [PATCH v2 15/16] pci-host: Convert conditional compilation of debug printfs to regular ifs,
Marc Marí <=
- [Qemu-devel] [PATCH v2 16/16] common: Convert conditional compilation of debug printfs to regular ifs, Marc Marí, 2014/05/13