From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbB8c-0002a3-Qt for qemu-devel@nongnu.org; Wed, 21 Nov 2012 09:18:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbB8b-0001QD-Sh for qemu-devel@nongnu.org; Wed, 21 Nov 2012 09:18:50 -0500 Received: from greensocs.com ([87.106.252.221]:39594 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbB8b-0001Pk-Lf for qemu-devel@nongnu.org; Wed, 21 Nov 2012 09:18:49 -0500 Message-ID: <50ACE2C5.9040905@greensocs.com> Date: Wed, 21 Nov 2012 15:18:45 +0100 From: =?ISO-8859-15?Q?KONRAD_Fr=E9d=E9ric?= MIME-Version: 1.0 References: <1353080159-10536-1-git-send-email-fred.konrad@greensocs.com> <1353080159-10536-2-git-send-email-fred.konrad@greensocs.com> <50ACD157.6010100@suse.de> <50ACDFA8.4040504@greensocs.com> <50ACE16D.8020905@suse.de> In-Reply-To: <50ACE16D.8020905@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: Peter Maydell , Stefan Hajnoczi , Evgeny Voevodin , mark.burton@greensocs.com, qemu-devel@nongnu.org, Anthony Liguori , Cornelia Huck On 21/11/2012 15:13, Andreas F=E4rber wrote: > Am 21.11.2012 15:05, schrieb KONRAD Fr=E9d=E9ric: >> On 21/11/2012 14:04, Andreas F=E4rber 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 wh= ere >>> 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 > ok, thanks. Fred