[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 37/65] failover: remove failover_find_primary_device() error pa
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 37/65] failover: remove failover_find_primary_device() error parameter |
Date: |
Wed, 9 Dec 2020 13:09:28 -0500 |
From: Juan Quintela <quintela@redhat.com>
It can never give one error.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20201118083748.1328-23-quintela@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/net/virtio-net.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index c708c03cf6..b994796734 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -832,7 +832,7 @@ static int is_my_primary(void *opaque, QemuOpts *opts,
Error **errp)
* @n: VirtIONet device
* @errp: returns an error if this function fails
*/
-static DeviceState *failover_find_primary_device(VirtIONet *n, Error **errp)
+static DeviceState *failover_find_primary_device(VirtIONet *n)
{
Error *err = NULL;
@@ -897,10 +897,7 @@ static void virtio_net_set_features(VirtIODevice *vdev,
uint64_t features)
qatomic_set(&n->failover_primary_hidden, false);
failover_add_primary(n, &err);
if (err) {
- n->primary_dev = failover_find_primary_device(n, &err);
- if (err) {
- goto out_err;
- }
+ n->primary_dev = failover_find_primary_device(n);
failover_add_primary(n, &err);
if (err) {
goto out_err;
@@ -3121,7 +3118,7 @@ static void virtio_net_handle_migration_primary(VirtIONet
*n,
should_be_hidden = qatomic_read(&n->failover_primary_hidden);
if (!n->primary_dev) {
- n->primary_dev = failover_find_primary_device(n, &err);
+ n->primary_dev = failover_find_primary_device(n);
if (!n->primary_dev) {
return;
}
--
MST
- [PULL v2 54/65] block/export: avoid g_return_val_if() input validation, (continued)
- [PULL v2 54/65] block/export: avoid g_return_val_if() input validation, Michael S. Tsirkin, 2020/12/09
- [PULL v2 56/65] acpi: cpuhp: introduce 'firmware performs eject' status/control bits, Michael S. Tsirkin, 2020/12/09
- [PULL v2 57/65] x86: acpi: introduce AcpiPmInfo::smi_on_cpu_unplug, Michael S. Tsirkin, 2020/12/09
- [PULL v2 58/65] tests/acpi: allow expected files change, Michael S. Tsirkin, 2020/12/09
- [PULL v2 59/65] x86: acpi: let the firmware handle pending "CPU remove" events in SMM, Michael S. Tsirkin, 2020/12/09
- [PULL v2 61/65] x86: ich9: factor out "guest_cpu_hotplug_features", Michael S. Tsirkin, 2020/12/09
- [PULL v2 60/65] tests/acpi: update expected files, Michael S. Tsirkin, 2020/12/09
- [PULL v2 63/65] pcie_aer: Fix help message of pcie_aer_inject_error command, Michael S. Tsirkin, 2020/12/09
- [PULL v2 64/65] hw/virtio-pci Added counter for pcie capabilities offsets., Michael S. Tsirkin, 2020/12/09
- [PULL v2 65/65] hw/virtio-pci Added AER capability., Michael S. Tsirkin, 2020/12/09
- [PULL v2 37/65] failover: remove failover_find_primary_device() error parameter,
Michael S. Tsirkin <=
- [PULL v2 62/65] x86: ich9: let firmware negotiate 'CPU hot-unplug with SMI' feature, Michael S. Tsirkin, 2020/12/09
- Re: [PULL v2 00/65] pc,pci,virtio: fixes, cleanups, Peter Maydell, 2020/12/09