From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8gKU-0003FP-MZ for qemu-devel@nongnu.org; Thu, 12 Nov 2009 15:31:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8gKO-0003Bf-8J for qemu-devel@nongnu.org; Thu, 12 Nov 2009 15:31:40 -0500 Received: from [199.232.76.173] (port=58763 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8gKN-0003BI-Rt for qemu-devel@nongnu.org; Thu, 12 Nov 2009 15:31:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42036) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8gKM-0005AW-P6 for qemu-devel@nongnu.org; Thu, 12 Nov 2009 15:31:35 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nACKVXWA016388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 12 Nov 2009 15:31:33 -0500 From: Mark McLoughlin Date: Thu, 12 Nov 2009 20:28:56 +0000 Message-Id: <1258057742-18699-2-git-send-email-markmc@redhat.com> In-Reply-To: <1258057742-18699-1-git-send-email-markmc@redhat.com> References: <1258057742-18699-1-git-send-email-markmc@redhat.com> Subject: [Qemu-devel] [PATCH 1/7] net: remove NICInfo::vc List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark McLoughlin , kraxel@redhat.com, quintela@redhat.com Since 1cc33683, this field is not set for most devices, so just remove it and its remaining few uses. Signed-off-by: Mark McLoughlin --- hw/dp8393x.c | 10 +++++----- hw/etraxfs_eth.c | 10 +++++----- hw/mcf_fec.c | 10 +++++----- hw/mipsnet.c | 10 +++++----- hw/usb-net.c | 14 +++++++------- net.h | 1 - 6 files changed, 27 insertions(+), 28 deletions(-) diff --git a/hw/dp8393x.c b/hw/dp8393x.c index ae8b16e..5143cc8 100644 --- a/hw/dp8393x.c +++ b/hw/dp8393x.c @@ -889,11 +889,11 @@ void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift, s->watchdog = qemu_new_timer(vm_clock, dp8393x_watchdog, s); s->regs[SONIC_SR] = 0x0004; /* only revision recognized by Linux */ - s->vc = nd->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, - nd->vlan, nd->netdev, - nd->model, nd->name, - nic_can_receive, nic_receive, NULL, NULL, - nic_cleanup, s); + s->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, + nd->vlan, nd->netdev, + nd->model, nd->name, + nic_can_receive, nic_receive, NULL, NULL, + nic_cleanup, s); qemu_format_nic_info_str(s->vc, nd->macaddr); qemu_register_reset(nic_reset, s); diff --git a/hw/etraxfs_eth.c b/hw/etraxfs_eth.c index ffe7082..2cc2332 100644 --- a/hw/etraxfs_eth.c +++ b/hw/etraxfs_eth.c @@ -590,11 +590,11 @@ void *etraxfs_eth_init(NICInfo *nd, target_phys_addr_t base, int phyaddr) eth->ethregs = cpu_register_io_memory(eth_read, eth_write, eth); cpu_register_physical_memory (base, 0x5c, eth->ethregs); - eth->vc = nd->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, - nd->vlan, nd->netdev, - nd->model, nd->name, - eth_can_receive, eth_receive, - NULL, NULL, eth_cleanup, eth); + eth->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, + nd->vlan, nd->netdev, + nd->model, nd->name, + eth_can_receive, eth_receive, + NULL, NULL, eth_cleanup, eth); eth->vc->opaque = eth; eth->vc->link_status_changed = eth_set_link; diff --git a/hw/mcf_fec.c b/hw/mcf_fec.c index 9f0d0f4..8242c8a 100644 --- a/hw/mcf_fec.c +++ b/hw/mcf_fec.c @@ -462,11 +462,11 @@ void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq) mcf_fec_writefn, s); cpu_register_physical_memory(base, 0x400, s->mmio_index); - s->vc = nd->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, - nd->vlan, nd->netdev, - nd->model, nd->name, - mcf_fec_can_receive, mcf_fec_receive, - NULL, NULL, mcf_fec_cleanup, s); + s->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, + nd->vlan, nd->netdev, + nd->model, nd->name, + mcf_fec_can_receive, mcf_fec_receive, + NULL, NULL, mcf_fec_cleanup, s); memcpy(s->macaddr, nd->macaddr, 6); qemu_format_nic_info_str(s->vc, s->macaddr); } diff --git a/hw/mipsnet.c b/hw/mipsnet.c index 65e1d59..67160a4 100644 --- a/hw/mipsnet.c +++ b/hw/mipsnet.c @@ -263,11 +263,11 @@ void mipsnet_init (int base, qemu_irq irq, NICInfo *nd) s->io_base = base; s->irq = irq; if (nd) { - s->vc = nd->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, - nd->vlan, nd->netdev, - nd->model, nd->name, - mipsnet_can_receive, mipsnet_receive, - NULL, NULL, mipsnet_cleanup, s); + s->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, + nd->vlan, nd->netdev, + nd->model, nd->name, + mipsnet_can_receive, mipsnet_receive, + NULL, NULL, mipsnet_cleanup, s); } else { s->vc = NULL; } diff --git a/hw/usb-net.c b/hw/usb-net.c index 9c6549c..7b8cc7a 100644 --- a/hw/usb-net.c +++ b/hw/usb-net.c @@ -1460,13 +1460,13 @@ USBDevice *usb_net_init(NICInfo *nd) memcpy(s->mac, nd->macaddr, 6); - s->vc = nd->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, - nd->vlan, nd->netdev, - nd->model, nd->name, - usbnet_can_receive, - usbnet_receive, - NULL, NULL, - usbnet_cleanup, s); + s->vc = qemu_new_vlan_client(NET_CLIENT_TYPE_NIC, + nd->vlan, nd->netdev, + nd->model, nd->name, + usbnet_can_receive, + usbnet_receive, + NULL, NULL, + usbnet_cleanup, s); qemu_format_nic_info_str(s->vc, s->mac); diff --git a/net.h b/net.h index 4ffce91..aa4b78a 100644 --- a/net.h +++ b/net.h @@ -124,7 +124,6 @@ struct NICInfo { char *devaddr; VLANState *vlan; VLANClientState *netdev; - VLANClientState *vc; void *private; int used; int bootable; -- 1.6.2.5