diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-12-23 17:53:19 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-01-12 10:16:23 +0000 |
commit | 57407ea44cc0a3d630b9b89a2be011f1955ce5c1 (patch) | |
tree | e3787f7db5a01db84173b5551f9a68a974f29be7 /hw/net/fsl_etsec | |
parent | 64ea8038ffbf703dcd438a108d2d5499c8ff95d9 (diff) | |
download | qemu-57407ea44cc0a3d630b9b89a2be011f1955ce5c1.zip qemu-57407ea44cc0a3d630b9b89a2be011f1955ce5c1.tar.gz qemu-57407ea44cc0a3d630b9b89a2be011f1955ce5c1.tar.bz2 |
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>
Diffstat (limited to 'hw/net/fsl_etsec')
-rw-r--r-- | hw/net/fsl_etsec/etsec.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index d4b4429..2fbbc6c 100644 --- a/hw/net/fsl_etsec/etsec.c +++ b/hw/net/fsl_etsec/etsec.c @@ -338,11 +338,6 @@ static void etsec_reset(DeviceState *d) MII_SR_100X_FD_CAPS | MII_SR_100T4_CAPS; } -static void etsec_cleanup(NetClientState *nc) -{ - /* qemu_log("eTSEC cleanup\n"); */ -} - static int etsec_can_receive(NetClientState *nc) { eTSEC *etsec = qemu_get_nic_opaque(nc); @@ -377,7 +372,6 @@ static NetClientInfo net_etsec_info = { .size = sizeof(NICState), .can_receive = etsec_can_receive, .receive = etsec_receive, - .cleanup = etsec_cleanup, .link_status_changed = etsec_set_link_status, }; |