virnetdevopenvswitch: Drop @brname arg from virNetDevOpenvswitchRemovePort()

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@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Michal Privoznik 2024-04-11 12:37:23 +02:00
parent f8b5bd855f
commit 378dc6a32b
4 changed files with 5 additions and 7 deletions

View File

@ -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));
}
}

View File

@ -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);

View File

@ -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;

View File

@ -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)