qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, Mark McLoughlin <markmc@redhat.com>
Subject: [Qemu-devel] [PATCH 3/4] Make virtio_net_init() return void
Date: Thu,  8 Jan 2009 14:47:48 +0000	[thread overview]
Message-ID: <1231426069-28321-3-git-send-email-markmc@redhat.com> (raw)
In-Reply-To: <1231426069-28321-2-git-send-email-markmc@redhat.com>

All PCI NIC init functions return void and nothing uses the
return value from virtio_net_init().

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 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

  reply	other threads:[~2009-01-08 14:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 17:42 [Qemu-devel] [6216] Add a model string to VLANClientState (Mark McLoughlin) Anthony Liguori
2009-01-07 19:23 ` Stefan Weil
2009-01-08 14:45   ` Mark McLoughlin
2009-01-08 14:47     ` [Qemu-devel] [PATCH 1/4] Add qemu_check_nic_model() and qemu_check_nic_model_list() Mark McLoughlin
2009-01-08 14:47       ` [Qemu-devel] [PATCH 2/4] Check NIC model in some NIC init functions Mark McLoughlin
2009-01-08 14:47         ` Mark McLoughlin [this message]
2009-01-08 14:47           ` [Qemu-devel] [PATCH 4/4] Make pci_nic_init() use qemu_setup_nic_model() Mark McLoughlin
2009-01-13 19:25       ` [Qemu-devel] [PATCH 1/3] Check NIC model in some NIC init functions Mark McLoughlin
2009-01-13 19:25         ` [Qemu-devel] [PATCH 2/3] Make virtio_net_init() return void Mark McLoughlin
2009-01-13 19:25           ` [Qemu-devel] [PATCH 3/3] Make pci_nic_init() use qemu_setup_nic_model() Mark McLoughlin
2009-01-13 19:47         ` [Qemu-devel] Re: [PATCH 1/3] Check NIC model in some NIC init functions Anthony Liguori
2009-01-13 20:59           ` Sylvain Petreolle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1231426069-28321-3-git-send-email-markmc@redhat.com \
    --to=markmc@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).