The @brname argument of virNetDevOpenvswitchRemovePort() is and was unused ever since its introduction in v0.9.11-rc1~257. Just remove it. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/hypervisor/domain_interface.c | 4 +--- src/util/virnetdevopenvswitch.c | 2 +- src/util/virnetdevopenvswitch.h | 4 ++-- src/util/virnetdevtap.c | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/hypervisor/domain_interface.c b/src/hypervisor/domain_interface.c index 0003412065..ccf4cb94bd 100644 --- a/src/hypervisor/domain_interface.c +++ b/src/hypervisor/domain_interface.c @@ -386,7 +386,6 @@ void virDomainInterfaceVportRemove(virDomainNetDef *net) { const virNetDevVPortProfile *vport = virDomainNetGetActualVirtPortProfile(net); - const char *brname; if (!vport) return; @@ -394,8 +393,7 @@ virDomainInterfaceVportRemove(virDomainNetDef *net) if (vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_MIDONET) { ignore_value(virNetDevMidonetUnbindPort(vport)); } else if (vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH) { - brname = virDomainNetGetActualBridgeName(net); - ignore_value(virNetDevOpenvswitchRemovePort(brname, net->ifname)); + ignore_value(virNetDevOpenvswitchRemovePort(net->ifname)); } } diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index 7d1cd25171..f1765ae1c8 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -206,7 +206,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname, * * Returns 0 in case of success or -1 in case of failure. */ -int virNetDevOpenvswitchRemovePort(const char *brname G_GNUC_UNUSED, const char *ifname) +int virNetDevOpenvswitchRemovePort(const char *ifname) { g_autofree char *errbuf = NULL; g_autoptr(virCommand) cmd = virNetDevOpenvswitchCreateCmd(&errbuf); diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitch.h index e6ee985f17..a20fb5b029 100644 --- a/src/util/virnetdevopenvswitch.h +++ b/src/util/virnetdevopenvswitch.h @@ -38,8 +38,8 @@ int virNetDevOpenvswitchAddPort(const char *brname, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT; -int virNetDevOpenvswitchRemovePort(const char *brname, const char *ifname) - ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; +int virNetDevOpenvswitchRemovePort(const char *ifname) + ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 3bfd36fc23..9a4866a4e4 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -543,7 +543,7 @@ virNetDevTapReattachBridge(const char *tapname, int ret; VIR_INFO("Removing %s from %s", tapname, master); if (useOVS) - ret = virNetDevOpenvswitchRemovePort(master, tapname); + ret = virNetDevOpenvswitchRemovePort(tapname); else ret = virNetDevBridgeRemovePort(master, tapname); if (ret < 0) -- 2.43.2 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx