From: "Andreas Färber" <afaerber@suse.de>
To: "KONRAD Frédéric" <fred.konrad@greensocs.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Evgeny Voevodin <e.voevodin@samsung.com>,
mark.burton@greensocs.com, qemu-devel@nongnu.org,
Anthony Liguori <anthony@codemonkey.ws>,
Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus.
Date: Wed, 21 Nov 2012 15:13:01 +0100 [thread overview]
Message-ID: <50ACE16D.8020905@suse.de> (raw)
In-Reply-To: <50ACDFA8.4040504@greensocs.com>
Am 21.11.2012 15:05, schrieb KONRAD Frédéric:
> On 21/11/2012 14:04, Andreas Färber wrote:
>> Am 16.11.2012 16:35, schrieb fred.konrad@greensocs.com:
>>> +#define DEBUG_VIRTIO_BUS
>>> +
>>> +#ifdef DEBUG_VIRTIO_BUS
>>> +
>>> +#define DPRINTF(fmt, ...) \
>>> +do { printf("virtio_bus: " fmt , ## __VA_ARGS__); } while (0)
>>> +#else
>>> +#define DPRINTF(fmt, ...) do {} while (0)
>>> +#endif
>> We recently had a discussion about bitrotting DPRINTF() statements where
>> I suggested to use if (0) instead of a no-op macro like this that
>> doesn't reference fmt and the varargs.
> I don't understand what you suggested, can you point me to an example ?
I don't have a link at hand, maybe Evgeny does. It was along the lines of:
#define DEBUG_VIRTIO_BUS 0
#define DPRINTF(fmt, ...) if (DEBUG_VIRTIO_BUS) { \
printf("virtio_bus: " fmt , ## __VA_ARGS__); \
}
The officially preferred alternative is to use tracepoints. ;)
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-11-21 14:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 15:35 [Qemu-devel] [RFC PATCH 0/3] Virtio refactoring fred.konrad
2012-11-16 15:35 ` [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus fred.konrad
2012-11-19 17:33 ` Peter Maydell
2012-11-20 14:12 ` Cornelia Huck
2012-11-20 14:30 ` KONRAD Frédéric
2012-11-20 16:15 ` Cornelia Huck
2012-11-20 16:45 ` KONRAD Frédéric
2012-11-20 17:27 ` Cornelia Huck
2012-11-21 9:31 ` KONRAD Frédéric
2012-11-21 13:04 ` Andreas Färber
2012-11-21 14:05 ` KONRAD Frédéric
2012-11-21 14:13 ` Andreas Färber [this message]
2012-11-21 14:18 ` KONRAD Frédéric
2012-11-16 15:35 ` [Qemu-devel] [RFC PATCH 2/3] virtio-pci : Add a virtio-bus interface fred.konrad
2012-11-16 15:35 ` [Qemu-devel] [RFC PATCH 3/3] virtio-blk : add the virtio-blk device fred.konrad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50ACE16D.8020905@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=cornelia.huck@de.ibm.com \
--cc=e.voevodin@samsung.com \
--cc=fred.konrad@greensocs.com \
--cc=mark.burton@greensocs.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.