On Mon, Apr 2, 2012 at 04:17, David Gibson <da...@gibson.dropbear.id.au> wrote: > From: Alexey Kardashevskiy <a...@ozlabs.ru> > > This adds DPRINTF() macros with the usual conventions to the spapr_pci > code.
Please use tracepoints instead of printf statements. Tracing is more flexible, more efficient and does not suffer from bitrot. > Cc: Michael S. Tsirkin <m...@redhat.com> > > Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> > Signed-off-by: David Gibson <da...@gibson.dropbear.id.au> > --- > hw/spapr_pci.c | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c > index b8a0313..61a53d5 100644 > --- a/hw/spapr_pci.c > +++ b/hw/spapr_pci.c > @@ -32,6 +32,14 @@ > > #include "hw/pci_internals.h" > > +/*#define DEBUG_SPAPR_PCI*/ > + > +#ifdef DEBUG_SPAPR_PCI > +# define DPRINTF(format, ...) fprintf(stderr, "QEMU: " format, ## > __VA_ARGS__) > +#else > +# define DPRINTF(format, ...) do { } while (0) > +#endif > + > static PCIDevice *find_dev(sPAPREnvironment *spapr, > uint64_t buid, uint32_t config_addr) > { > -- > 1.7.9.1 > >