From patchwork Tue Mar 2 21:37:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 46714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 32488B7D59 for ; Wed, 3 Mar 2010 08:38:49 +1100 (EST) Received: from localhost ([127.0.0.1]:41962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmZni-0003v6-2V for incoming@patchwork.ozlabs.org; Tue, 02 Mar 2010 16:38:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NmZnC-0003ui-G8 for qemu-devel@nongnu.org; Tue, 02 Mar 2010 16:38:14 -0500 Received: from [199.232.76.173] (port=46537 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmZnC-0003ua-3U for qemu-devel@nongnu.org; Tue, 02 Mar 2010 16:38:14 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NmZnA-0004ra-93 for qemu-devel@nongnu.org; Tue, 02 Mar 2010 16:38:13 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:51360) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NmZn9-0004rS-OV for qemu-devel@nongnu.org; Tue, 02 Mar 2010 16:38:12 -0500 Received: from flocke.weilnetz.de (p54ADFEFD.dip.t-dialin.net [84.173.254.253]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MDTqb-1NwFun1US5-00H160; Tue, 02 Mar 2010 22:38:08 +0100 Received: from stefan by flocke.weilnetz.de with local (Exim 4.71) (envelope-from ) id 1NmZn5-0004ny-1d; Tue, 02 Mar 2010 22:38:07 +0100 From: Stefan Weil To: QEMU Developers X-Mailer: git-send-email 1.7.0 In-Reply-To: <4B7821AC.6080400@mail.berlios.de> References: <4B7821AC.6080400@mail.berlios.de> X-Provags-ID: V01U2FsdGVkX19RAzrGJYwXPLfakzjc4dnKeGscKpAGktAtgYu 6+6JI3ON/OccP9D4tZ0b63HBqaxXpSQXKENrFzxZX+0GOKd28D i6hLYxz/RleG4ewR0KqO0sSnDWiCOwmZoYjnFLhvTy82CzfYjd 03A== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: mst@redhat.com Subject: [Qemu-devel] [PATCHv3 01/20] eepro100: Fix compiler errors from debug messages X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When debug output was enabled (by defining DEBUG_EEPRO100), some debug messages resulted in a compiler error. This is fixed here. Signed-off-by: Stefan Weil --- hw/eepro100.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/eepro100.c b/hw/eepro100.c index b33dbb8..6580ca8 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -56,7 +56,9 @@ #define KiB 1024 /* Debug EEPRO100 card. */ -//~ #define DEBUG_EEPRO100 +#if 0 +# define DEBUG_EEPRO100 +#endif #ifdef DEBUG_EEPRO100 #define logout(fmt, ...) fprintf(stderr, "EE100\t%-24s" fmt, __func__, ## __VA_ARGS__) @@ -874,9 +876,8 @@ static void action_command(EEPRO100State *s) cpu_physical_memory_read(s->cb_address, (uint8_t *)&s->tx, sizeof(s->tx)); uint16_t status = le16_to_cpu(s->tx.status); uint16_t command = le16_to_cpu(s->tx.command); - logout - ("val=0x%02x (cu start), status=0x%04x, command=0x%04x, link=0x%08x\n", - val, status, command, s->tx.link); + logout("val=(cu start), status=0x%04x, command=0x%04x, link=0x%08x\n", + status, command, s->tx.link); bool bit_el = ((command & 0x8000) != 0); bool bit_s = ((command & 0x4000) != 0); bool bit_i = ((command & 0x2000) != 0); @@ -891,7 +892,7 @@ static void action_command(EEPRO100State *s) break; case CmdIASetup: cpu_physical_memory_read(s->cb_address + 8, &s->conf.macaddr.a[0], 6); - TRACE(OTHER, logout("macaddr: %s\n", nic_dump(&s->macaddr[0], 6))); + TRACE(OTHER, logout("macaddr: %s\n", nic_dump(&s->conf.macaddr.a[0], 6))); break; case CmdConfigure: cpu_physical_memory_read(s->cb_address + 8, &s->configuration[0], @@ -1875,7 +1876,7 @@ static int nic_init(PCIDevice *pci_dev, uint32_t device) pci_mmio_map); qemu_macaddr_default_if_unset(&s->conf.macaddr); - logout("macaddr: %s\n", nic_dump(&s->macaddr[0], 6)); + logout("macaddr: %s\n", nic_dump(&s->conf.macaddr.a[0], 6)); assert(s->region[1] == 0); nic_reset(s);