From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wlnf1-0006nI-7w for qemu-devel@nongnu.org; Sat, 17 May 2014 19:05:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wlnes-000468-68 for qemu-devel@nongnu.org; Sat, 17 May 2014 19:04:59 -0400 Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]:63032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wlner-000460-Um for qemu-devel@nongnu.org; Sat, 17 May 2014 19:04:50 -0400 Received: by mail-wi0-f175.google.com with SMTP id f8so2518393wiw.2 for ; Sat, 17 May 2014 16:04:49 -0700 (PDT) From: =?UTF-8?q?Marc=20Mar=C3=AD?= Date: Sun, 18 May 2014 01:03:40 +0200 Message-Id: <1400367823-32610-14-git-send-email-marc.mari.barcelo@gmail.com> In-Reply-To: <1400367823-32610-1-git-send-email-marc.mari.barcelo@gmail.com> References: <1400367823-32610-1-git-send-email-marc.mari.barcelo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v3 13/16] isa: Convert debug printfs to QEMU_DPRINTF List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc=20Mar=C3=AD?= , Stefan Hajnoczi , Peter Crosthwaite , =?UTF-8?q?Andreas=20F=C3=A4rber?= Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. As the debug printf is always put in code, some formats had to be changed to avoid warnings treated as errors at compile time.. Signed-off-by: Marc MarĂ­ --- hw/isa/vt82c686.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 1a93afd..710c1c8 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -29,11 +29,14 @@ //#define DEBUG_VT82C686B #ifdef DEBUG_VT82C686B -#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __FUNCTION__, ##__VA_ARGS__) +#define DEBUG_VT82C686B_ENABLED 1 #else -#define DPRINTF(fmt, ...) +#define DEBUG_VT82C686B_ENABLED 0 #endif +#define DPRINTF(fmt, ...) \ + QEMU_DPRINTF(DEBUG_VT82C686B_ENABLED, "vt82c686", fmt, ## __VA_ARGS__) + typedef struct SuperIOConfig { uint8_t config[0xff]; @@ -53,7 +56,8 @@ static void superio_ioport_writeb(void *opaque, hwaddr addr, uint64_t data, int can_write; SuperIOConfig *superio_conf = opaque; - DPRINTF("superio_ioport_writeb address 0x%x val 0x%x\n", addr, data); + DPRINTF("superio_ioport_writeb address 0x%" PRIx64 " val 0x%" PRIx64 "\n", + addr, data); if (addr == 0x3f0) { superio_conf->index = data & 0xff; } else { @@ -99,7 +103,7 @@ static uint64_t superio_ioport_readb(void *opaque, hwaddr addr, unsigned size) { SuperIOConfig *superio_conf = opaque; - DPRINTF("superio_ioport_readb address 0x%x\n", addr); + DPRINTF("superio_ioport_readb address 0x%" PRIx64 "\n", addr); return (superio_conf->config[superio_conf->index]); } -- 1.7.10.4