net: remove all cleanup methods from NIC NetClientInfos
commit57407ea44cc0a3d630b9b89a2be011f1955ce5c1
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 23 Dec 2014 16:53:19 +0000 (23 17:53 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 12 Jan 2015 10:16:23 +0000 (12 10:16 +0000)
treee3787f7db5a01db84173b5551f9a68a974f29be7
parent64ea8038ffbf703dcd438a108d2d5499c8ff95d9
net: remove all cleanup methods from NIC NetClientInfos

All NICs have a cleanup function that, in most cases, zeroes the pointer
to the NICState.  In some cases, it frees data belonging to the NIC.

However, this function is never called except when exiting from QEMU.
It is not necessary to NULL pointers and free data here; the right place
to do that would be in the device's unrealize function, after calling
qemu_del_nic.  Zeroing the NIC multiple times is also wrong for multiqueue
devices.

This cleanup function gets in the way of making the NetClientStates for
the NIC hold an object_ref reference to the object, so get rid of it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
27 files changed:
hw/net/allwinner_emac.c
hw/net/cadence_gem.c
hw/net/dp8393x.c
hw/net/e1000.c
hw/net/eepro100.c
hw/net/etraxfs_eth.c
hw/net/fsl_etsec/etsec.c
hw/net/lan9118.c
hw/net/lance.c
hw/net/mcf_fec.c
hw/net/milkymist-minimac2.c
hw/net/mipsnet.c
hw/net/ne2000-isa.c
hw/net/ne2000.c
hw/net/opencores_eth.c
hw/net/pcnet-pci.c
hw/net/pcnet.c
hw/net/pcnet.h
hw/net/rtl8139.c
hw/net/smc91c111.c
hw/net/spapr_llan.c
hw/net/stellaris_enet.c
hw/net/virtio-net.c
hw/net/vmxnet3.c
hw/net/xgmac.c
hw/net/xilinx_axienet.c
hw/net/xilinx_ethlite.c