mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +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:
parent
07de813924
commit
0ee56369c8
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user