[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 41/47] hw/s390x/s390-virtio-ccw: use qemu_create_nic_device()
From: |
David Woodhouse |
Subject: |
[PATCH v4 41/47] hw/s390x/s390-virtio-ccw: use qemu_create_nic_device() |
Date: |
Fri, 26 Jan 2024 17:25:18 +0000 |
From: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Thomas Huth <thuth@redhat.com>
---
hw/s390x/s390-virtio-ccw.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index c99682b07d..62804cc228 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -229,16 +229,9 @@ static void s390_init_ipl_dev(const char *kernel_filename,
static void s390_create_virtio_net(BusState *bus, const char *name)
{
- int i;
-
- for (i = 0; i < nb_nics; i++) {
- NICInfo *nd = &nd_table[i];
- DeviceState *dev;
-
- qemu_check_nic_model(nd, "virtio");
+ DeviceState *dev;
- dev = qdev_new(name);
- qdev_set_nic_properties(dev, nd);
+ while ((dev = qemu_create_nic_device(name, true, "virtio"))) {
qdev_realize_and_unref(dev, bus, &error_fatal);
}
}
--
2.43.0
- [PATCH v4 35/47] hw/mips/mipssim: use qemu_create_nic_device(), (continued)
- [PATCH v4 35/47] hw/mips/mipssim: use qemu_create_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 46/47] net: remove qemu_show_nic_models(), qemu_find_nic_model(), David Woodhouse, 2024/01/26
- [PATCH v4 13/47] hw/mips/malta: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 30/47] hw/arm: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 40/47] hw/riscv: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 36/47] hw/mips/jazz: use qemu_find_nic_info(), David Woodhouse, 2024/01/26
- [PATCH v4 26/47] hw/net/lan9118: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 17/47] hw/ppc: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 12/47] hw/mips/fuloong2e: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 20/47] hw/xtensa/virt: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 41/47] hw/s390x/s390-virtio-ccw: use qemu_create_nic_device(),
David Woodhouse <=
- [PATCH v4 02/47] net: report list of available models according to platform, David Woodhouse, 2024/01/26
- [PATCH v4 24/47] hw/arm/fsl: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26