From patchwork Sun Feb 14 16:16:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 45311 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 3B7B4B7C06 for ; Mon, 15 Feb 2010 03:22:14 +1100 (EST) Received: from localhost ([127.0.0.1]:57064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NghC7-0006Kj-VA for incoming@patchwork.ozlabs.org; Sun, 14 Feb 2010 11:19:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ngh9G-0005x2-CG for qemu-devel@nongnu.org; Sun, 14 Feb 2010 11:16:42 -0500 Received: from [199.232.76.173] (port=43055 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ngh9G-0005wu-2l for qemu-devel@nongnu.org; Sun, 14 Feb 2010 11:16:42 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ngh9E-00021W-IP for qemu-devel@nongnu.org; Sun, 14 Feb 2010 11:16:41 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:52947) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ngh9D-00021F-Pf for qemu-devel@nongnu.org; Sun, 14 Feb 2010 11:16:40 -0500 Received: from flocke.weilnetz.de (p54ADCA6B.dip.t-dialin.net [84.173.202.107]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LwXF9-1Nl1Po2elD-018AUZ; Sun, 14 Feb 2010 17:16:35 +0100 Received: from stefan by flocke.weilnetz.de with local (Exim 4.71) (envelope-from ) id 1Ngh98-0005Ub-No; Sun, 14 Feb 2010 17:16:34 +0100 From: Stefan Weil To: QEMU Developers Date: Sun, 14 Feb 2010 17:16:10 +0100 Message-Id: <1266164189-21062-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <4B7821AC.6080400@mail.berlios.de> References: <4B7821AC.6080400@mail.berlios.de> X-Provags-ID: V01U2FsdGVkX1+Ww/g2RiW5Kiy6RMYo7ITdBBs6idcgioQOtt7 238dfdVnBxqtH+kl7xdkOicxfwhrjSW/P3pj8p9I+nyAkMCJ6I jEV0yEW81HnB7jA7zMhvgV6CA6sgPN40I33s1GSkwdmjjIXV/E wJQ== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH 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);