1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

qemu_domain.c: change qemuDomainMemoryDeviceAlignSize() return type

After the recent changes, this function is now always returning
zero. Turn it to 'void' to relieve callers from checking it.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Daniel Henrique Barboza 2020-07-30 16:48:03 -03:00 committed by Michal Privoznik
parent 07de813924
commit 0ee56369c8
3 changed files with 5 additions and 9 deletions

View File

@ -8130,7 +8130,7 @@ qemuDomainAlignMemorySizes(virDomainDefPtr def)
* inplace. Default rounding is now to 1 MiB (qemu requires rounding to page,
* size so this should be safe).
*/
int
void
qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
virDomainMemoryDefPtr mem)
{
@ -8139,8 +8139,6 @@ qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
mem->size = VIR_ROUND_UP(mem->size,
qemuDomainGetMemorySizeAlignment(def));
}
return 0;
}

View File

@ -754,8 +754,8 @@ bool qemuDomainHasBlockjob(virDomainObjPtr vm, bool copy_only)
unsigned long long qemuDomainGetMemorySizeAlignment(const virDomainDef *def);
int qemuDomainAlignMemorySizes(virDomainDefPtr def);
int qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
virDomainMemoryDefPtr mem);
void qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
virDomainMemoryDefPtr mem);
virDomainChrDefPtr qemuFindAgentConfig(virDomainDefPtr def);

View File

@ -2368,8 +2368,7 @@ qemuDomainAttachMemory(virQEMUDriverPtr driver,
int id;
int ret = -1;
if (qemuDomainMemoryDeviceAlignSize(vm->def, mem) < 0)
goto cleanup;
qemuDomainMemoryDeviceAlignSize(vm->def, mem);
if (qemuDomainDefValidateMemoryHotplug(vm->def, priv->qemuCaps, mem) < 0)
goto cleanup;
@ -5611,8 +5610,7 @@ qemuDomainDetachPrepMemory(virDomainObjPtr vm,
virDomainMemoryDefPtr mem;
int idx;
if (qemuDomainMemoryDeviceAlignSize(vm->def, match) < 0)
return -1;
qemuDomainMemoryDeviceAlignSize(vm->def, match);
if ((idx = virDomainMemoryFindByDef(vm->def, match)) < 0) {
virReportError(VIR_ERR_DEVICE_MISSING,