Remove the uneeded attribute and return value. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_domain.c | 15 ++++----------- src/qemu/qemu_domain.h | 3 +-- src/qemu/qemu_driver.c | 7 ++----- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index d9da696a55..ed63a6f33f 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -10256,25 +10256,18 @@ qemuDomainMachineHasBuiltinIDE(const char *machine) * * In case when the balloon is not present for the domain, the function * recalculates the maximum size to reflect possible changes. - * - * Returns 0 on success and updates vm->def->mem.cur_balloon if necessary. */ -int -qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver ATTRIBUTE_UNUSED, - virDomainObjPtr vm) +void +qemuDomainUpdateCurrentMemorySize(virDomainObjPtr vm) { /* inactive domain doesn't need size update */ if (!virDomainObjIsActive(vm)) - return 0; + return; /* if no balloning is available, the current size equals to the current * full memory size */ - if (!virDomainDefHasMemballoon(vm->def)) { + if (!virDomainDefHasMemballoon(vm->def)) vm->def->mem.cur_balloon = virDomainDefGetMemoryTotal(vm->def); - return 0; - } - - return 0; } diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index fe474170dc..6d800a6c9d 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -851,8 +851,7 @@ bool qemuDomainMachineIsPSeries(const char *machine, const virArch arch); bool qemuDomainMachineHasBuiltinIDE(const char *machine); -int qemuDomainUpdateCurrentMemorySize(virQEMUDriverPtr driver, - virDomainObjPtr vm); +void qemuDomainUpdateCurrentMemorySize(virDomainObjPtr vm); unsigned long long qemuDomainGetMemLockLimitBytes(virDomainDefPtr def); int qemuDomainAdjustMaxMemLock(virDomainObjPtr vm); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 97042a972b..af8ef05dd9 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2585,7 +2585,6 @@ qemuDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info) { unsigned long long maxmem; - virQEMUDriverPtr driver = dom->conn->privateData; virDomainObjPtr vm; int ret = -1; @@ -2595,8 +2594,7 @@ qemuDomainGetInfo(virDomainPtr dom, if (virDomainGetInfoEnsureACL(dom->conn, vm->def) < 0) goto cleanup; - if (qemuDomainUpdateCurrentMemorySize(driver, vm) < 0) - goto cleanup; + qemuDomainUpdateCurrentMemorySize(vm); memset(info, 0, sizeof(*info)); @@ -7352,8 +7350,7 @@ static char if (virDomainGetXMLDescEnsureACL(dom->conn, vm->def, flags) < 0) goto cleanup; - if (qemuDomainUpdateCurrentMemorySize(driver, vm) < 0) - goto cleanup; + qemuDomainUpdateCurrentMemorySize(vm); if ((flags & VIR_DOMAIN_XML_MIGRATABLE)) flags |= QEMU_DOMAIN_FORMAT_LIVE_FLAGS; -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list