El Tue, 13 May 2014 09:02:51 +0200
Marc Marí <marc.mari.barc...@gmail.com> 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

Reply via email to