qemuBuildControllerDevStr: remove nusbcontroller argument

Now that it's no longer needed, remove the argument.
This removes the last helper variable in
qemuBuildControllerDevCommandLine.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Ján Tomko 2019-01-15 16:31:54 +01:00
parent 8f5e50e003
commit 75ecfd2521
3 changed files with 4 additions and 11 deletions

View File

@ -2857,8 +2857,7 @@ int
qemuBuildControllerDevStr(const virDomainDef *domainDef,
virDomainControllerDefPtr def,
virQEMUCapsPtr qemuCaps,
char **devstr,
int *nusbcontroller)
char **devstr)
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
@ -2941,9 +2940,6 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
if (qemuBuildUSBControllerDevStr(domainDef, def, qemuCaps, &buf) == -1)
goto error;
if (nusbcontroller)
*nusbcontroller += 1;
break;
case VIR_DOMAIN_CONTROLLER_TYPE_PCI: {
@ -3149,7 +3145,6 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd,
virQEMUCapsPtr qemuCaps)
{
size_t i, j;
int usbcontroller = 0;
int contOrder[] = {
/*
* List of controller types that we add commandline args for,
@ -3212,8 +3207,7 @@ qemuBuildControllerDevCommandLine(virCommandPtr cmd,
continue;
}
if (qemuBuildControllerDevStr(def, cont, qemuCaps,
&devstr, &usbcontroller) < 0)
if (qemuBuildControllerDevStr(def, cont, qemuCaps, &devstr) < 0)
goto cleanup;
if (devstr) {

View File

@ -117,8 +117,7 @@ char
int qemuBuildControllerDevStr(const virDomainDef *domainDef,
virDomainControllerDefPtr def,
virQEMUCapsPtr qemuCaps,
char **devstr,
int *nusbcontroller);
char **devstr);
int qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
const char *alias,

View File

@ -1022,7 +1022,7 @@ int qemuDomainAttachControllerDevice(virQEMUDriverPtr driver,
if (qemuAssignDeviceControllerAlias(vm->def, priv->qemuCaps, controller) < 0)
goto cleanup;
if (qemuBuildControllerDevStr(vm->def, controller, priv->qemuCaps, &devstr, NULL) < 0)
if (qemuBuildControllerDevStr(vm->def, controller, priv->qemuCaps, &devstr) < 0)
goto cleanup;
if (!devstr)