From: David Woodhouse Date: Sat, 21 Oct 2023 20:21:03 +0000 (+0100) Subject: hw/loongarch: use pci_init_nic_devices() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=13af77ee509c646fff48e5a21d1558cede334732;p=qemu.git hw/loongarch: use pci_init_nic_devices() Signed-off-by: David Woodhouse Reviewed-by: Song Gao --- diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index c9a680e61a..0ad7d8c887 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -504,9 +504,7 @@ static void loongarch_devices_init(DeviceState *pch_pic, LoongArchMachineState * fdt_add_uart_node(lams); /* Network init */ - for (i = 0; i < nb_nics; i++) { - pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NULL); - } + pci_init_nic_devices(pci_bus, mc->default_nic); /* * There are some invalid guest memory access.