From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nia2v-0001gj-3v for qemu-devel@nongnu.org; Fri, 19 Feb 2010 16:05:57 -0500 Received: from [199.232.76.173] (port=41361 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nia2u-0001gN-LW for qemu-devel@nongnu.org; Fri, 19 Feb 2010 16:05:56 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nia2s-0005bQ-Ke for qemu-devel@nongnu.org; Fri, 19 Feb 2010 16:05:56 -0500 Received: from mail-yw0-f197.google.com ([209.85.211.197]:62971) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nia2s-0005av-CB for qemu-devel@nongnu.org; Fri, 19 Feb 2010 16:05:54 -0500 Received: by ywh35 with SMTP id 35so468068ywh.4 for ; Fri, 19 Feb 2010 13:05:53 -0800 (PST) Message-ID: <4B7EFD2E.3010100@codemonkey.ws> Date: Fri, 19 Feb 2010 15:05:50 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 01/20] eepro100: Fix compiler errors from debug messages References: <4B7821AC.6080400@mail.berlios.de> <1266164189-21062-1-git-send-email-weil@mail.berlios.de> In-Reply-To: <1266164189-21062-1-git-send-email-weil@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers , "Michael S. Tsirkin" On 02/14/2010 10:16 AM, Stefan Weil wrote: > 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 > Michael, Can you take these through your tree? Regards, Anthony Liguori > --- > 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); >