From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKwAu-0007Yn-Gf for qemu-devel@nongnu.org; Thu, 08 Jan 2009 09:47:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKwAr-0007Xf-Vx for qemu-devel@nongnu.org; Thu, 08 Jan 2009 09:47:55 -0500 Received: from [199.232.76.173] (port=39470 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKwAr-0007XY-Pz for qemu-devel@nongnu.org; Thu, 08 Jan 2009 09:47:53 -0500 Received: from mail12.svc.cra.dublin.eircom.net ([159.134.118.28]:34338) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LKwAr-0007ob-Dv for qemu-devel@nongnu.org; Thu, 08 Jan 2009 09:47:53 -0500 From: Mark McLoughlin Date: Thu, 8 Jan 2009 14:47:48 +0000 Message-Id: <1231426069-28321-3-git-send-email-markmc@redhat.com> In-Reply-To: <1231426069-28321-2-git-send-email-markmc@redhat.com> References: <1231425939.4296.79.camel@localhost.localdomain> <1231426069-28321-1-git-send-email-markmc@redhat.com> <1231426069-28321-2-git-send-email-markmc@redhat.com> Subject: [Qemu-devel] [PATCH 3/4] Make virtio_net_init() return void Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Mark McLoughlin All PCI NIC init functions return void and nothing uses the return value from virtio_net_init(). Signed-off-by: Mark McLoughlin --- hw/virtio-net.c | 6 ++---- hw/virtio-net.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index de1f7ce..43fde20 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -299,7 +299,7 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) return 0; } -PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) +void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) { VirtIONet *n; static int virtio_net_id; @@ -309,7 +309,7 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) 0x02, 0x00, 0x00, 6, sizeof(VirtIONet)); if (!n) - return NULL; + return; n->vdev.get_config = virtio_net_update_config; n->vdev.get_features = virtio_net_get_features; @@ -328,6 +328,4 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) register_savevm("virtio-net", virtio_net_id++, 2, virtio_net_save, virtio_net_load, n); - - return (PCIDevice *)n; } diff --git a/hw/virtio-net.h b/hw/virtio-net.h index 0d9f71b..7446b11 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -75,6 +75,6 @@ struct virtio_net_hdr_mrg_rxbuf uint16_t num_buffers; /* Number of merged rx buffers */ }; -PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn); +void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn); #endif -- 1.6.0.6