Commit 291c6ff9bf8cec5f7aa3f0da8895bd65b7d9bf93
1 parent
5a16dc63
Make virtio_net_init() return void (Mark McLoughlin)
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> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6291 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
3 additions
and
5 deletions
hw/virtio-net.c
| @@ -315,7 +315,7 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) | @@ -315,7 +315,7 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id) | ||
| 315 | return 0; | 315 | return 0; |
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | -PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) | 318 | +void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) |
| 319 | { | 319 | { |
| 320 | VirtIONet *n; | 320 | VirtIONet *n; |
| 321 | static int virtio_net_id; | 321 | static int virtio_net_id; |
| @@ -326,7 +326,7 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) | @@ -326,7 +326,7 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) | ||
| 326 | sizeof(struct virtio_net_config), | 326 | sizeof(struct virtio_net_config), |
| 327 | sizeof(VirtIONet)); | 327 | sizeof(VirtIONet)); |
| 328 | if (!n) | 328 | if (!n) |
| 329 | - return NULL; | 329 | + return; |
| 330 | 330 | ||
| 331 | n->vdev.get_config = virtio_net_update_config; | 331 | n->vdev.get_config = virtio_net_update_config; |
| 332 | n->vdev.get_features = virtio_net_get_features; | 332 | n->vdev.get_features = virtio_net_get_features; |
| @@ -347,6 +347,4 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) | @@ -347,6 +347,4 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) | ||
| 347 | 347 | ||
| 348 | register_savevm("virtio-net", virtio_net_id++, 2, | 348 | register_savevm("virtio-net", virtio_net_id++, 2, |
| 349 | virtio_net_save, virtio_net_load, n); | 349 | virtio_net_save, virtio_net_load, n); |
| 350 | - | ||
| 351 | - return (PCIDevice *)n; | ||
| 352 | } | 350 | } |
hw/virtio-net.h
| @@ -80,6 +80,6 @@ struct virtio_net_hdr_mrg_rxbuf | @@ -80,6 +80,6 @@ struct virtio_net_hdr_mrg_rxbuf | ||
| 80 | uint16_t num_buffers; /* Number of merged rx buffers */ | 80 | uint16_t num_buffers; /* Number of merged rx buffers */ |
| 81 | }; | 81 | }; |
| 82 | 82 | ||
| 83 | -PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn); | 83 | +void virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn); |
| 84 | 84 | ||
| 85 | #endif | 85 | #endif |