* [PATCH] Fix warnings in virtio-net
@ 2009-02-09 9:17 Jan Kiszka
2009-02-09 9:41 ` Mark McLoughlin
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2009-02-09 9:17 UTC (permalink / raw)
To: kvm-devel
Those void returns are bogus, but there is no need to check for
allocation failures anyway.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c
index f125edc..35f66d7 100644
--- a/qemu/hw/virtio-net.c
+++ b/qemu/hw/virtio-net.c
@@ -692,12 +692,8 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
n->promisc = 1; /* for compatibility */
n->mac_table.macs = qemu_mallocz(MAC_TABLE_ENTRIES * ETH_ALEN);
- if (!n->mac_table.macs)
- return;
n->vlans = qemu_mallocz(MAX_VLAN >> 3);
- if (!n->vlans)
- return;
register_savevm("virtio-net", virtio_net_id++, VIRTIO_NET_VM_VERSION,
virtio_net_save, virtio_net_load, n);
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Fix warnings in virtio-net
2009-02-09 9:17 [PATCH] Fix warnings in virtio-net Jan Kiszka
@ 2009-02-09 9:41 ` Mark McLoughlin
2009-02-09 9:47 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Mark McLoughlin @ 2009-02-09 9:41 UTC (permalink / raw)
To: Jan Kiszka; +Cc: kvm-devel
On Mon, 2009-02-09 at 10:17 +0100, Jan Kiszka wrote:
> Those void returns are bogus, but there is no need to check for
> allocation failures anyway.
Looks good:
Acked-by: Mark McLoughlin <markmc@redhat.com>
but should be re-done as a patch against qemu and sent to qemu-devel.
Thanks,
Mark.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix warnings in virtio-net
2009-02-09 9:41 ` Mark McLoughlin
@ 2009-02-09 9:47 ` Jan Kiszka
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2009-02-09 9:47 UTC (permalink / raw)
To: Mark McLoughlin; +Cc: kvm-devel
Mark McLoughlin wrote:
> On Mon, 2009-02-09 at 10:17 +0100, Jan Kiszka wrote:
>> Those void returns are bogus, but there is no need to check for
>> allocation failures anyway.
>
> Looks good:
>
> Acked-by: Mark McLoughlin <markmc@redhat.com>
>
> but should be re-done as a patch against qemu and sent to qemu-devel.
Indeed. I checked against the wrong branch and thought it was
kvm-specific. Will repost.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-09 9:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 9:17 [PATCH] Fix warnings in virtio-net Jan Kiszka
2009-02-09 9:41 ` Mark McLoughlin
2009-02-09 9:47 ` Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox