From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk7IU-0002sO-14 for qemu-devel@nongnu.org; Tue, 13 May 2014 03:38:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wk7IL-0003Pz-QN for qemu-devel@nongnu.org; Tue, 13 May 2014 03:38:45 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43526 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk7IL-0003Pm-Jk for qemu-devel@nongnu.org; Tue, 13 May 2014 03:38:37 -0400 Message-ID: <5371CBFB.4030609@suse.de> Date: Tue, 13 May 2014 09:38:35 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1399964572-5376-1-git-send-email-marc.mari.barcelo@gmail.com> <1399964572-5376-2-git-send-email-marc.mari.barcelo@gmail.com> In-Reply-To: <1399964572-5376-2-git-send-email-marc.mari.barcelo@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 01/16] x86: Convert conditional compilation of debug printfs to regular ifs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TWFyYyBNYXLDrQ==?= , qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Peter Crosthwaite , xen-devel , kvm Am 13.05.2014 09:02, schrieb Marc Mar=C3=AD: > Modify debug macros to have the same format through the codebase and us= e regular > ifs instead of ifdef. >=20 > As the debug printf is always put in code, some casting had to be added= to avoid > warnings treated as errors at compile time. >=20 > Signed-off-by: Marc Mar=C3=AD > --- > hw/i386/kvm/pci-assign.c | 9 ++++----- > hw/i386/multiboot.c | 6 ++++-- > target-i386/kvm.c | 8 ++++---- > xen-hvm.c | 12 ++++++------ > xen-mapcache.c | 8 ++++---- > 5 files changed, 22 insertions(+), 21 deletions(-) >=20 > diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c > index e55421a..35757ae 100644 > --- a/hw/i386/kvm/pci-assign.c > +++ b/hw/i386/kvm/pci-assign.c > @@ -51,14 +51,13 @@ > //#define DEVICE_ASSIGNMENT_DEBUG > =20 > #ifdef DEVICE_ASSIGNMENT_DEBUG > -#define DEBUG(fmt, ...) \ > - do { \ > - fprintf(stderr, "%s: " fmt, __func__ , __VA_ARGS__); \ > - } while (0) > +#define DEVICE_ASSIGNMENT_DEBUG_ENABLED 1 > #else > -#define DEBUG(fmt, ...) > +#define DEVICE_ASSIGNMENT_DEBUG_ENABLED 0 > #endif > =20 > +#define DEBUG(fmt, ...) QEMU_DPRINTF(DEVICE_ASSIGNMENT_DEBUG_ENABLED, = "pci_assign", fmt, ## __VA_ARGS__) This is broken, QEMU_DPRINTF() is not defined yet. Looks like an ordering issue with 16/16. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg