mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +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,
|
* inplace. Default rounding is now to 1 MiB (qemu requires rounding to page,
|
||||||
* size so this should be safe).
|
* size so this should be safe).
|
||||||
*/
|
*/
|
||||||
int
|
void
|
||||||
qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
|
qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
|
||||||
virDomainMemoryDefPtr mem)
|
virDomainMemoryDefPtr mem)
|
||||||
{
|
{
|
||||||
@ -8139,8 +8139,6 @@ qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
|
|||||||
mem->size = VIR_ROUND_UP(mem->size,
|
mem->size = VIR_ROUND_UP(mem->size,
|
||||||
qemuDomainGetMemorySizeAlignment(def));
|
qemuDomainGetMemorySizeAlignment(def));
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -754,8 +754,8 @@ bool qemuDomainHasBlockjob(virDomainObjPtr vm, bool copy_only)
|
|||||||
unsigned long long qemuDomainGetMemorySizeAlignment(const virDomainDef *def);
|
unsigned long long qemuDomainGetMemorySizeAlignment(const virDomainDef *def);
|
||||||
|
|
||||||
int qemuDomainAlignMemorySizes(virDomainDefPtr def);
|
int qemuDomainAlignMemorySizes(virDomainDefPtr def);
|
||||||
int qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
|
void qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
|
||||||
virDomainMemoryDefPtr mem);
|
virDomainMemoryDefPtr mem);
|
||||||
|
|
||||||
virDomainChrDefPtr qemuFindAgentConfig(virDomainDefPtr def);
|
virDomainChrDefPtr qemuFindAgentConfig(virDomainDefPtr def);
|
||||||
|
|
||||||
|
@ -2368,8 +2368,7 @@ qemuDomainAttachMemory(virQEMUDriverPtr driver,
|
|||||||
int id;
|
int id;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if (qemuDomainMemoryDeviceAlignSize(vm->def, mem) < 0)
|
qemuDomainMemoryDeviceAlignSize(vm->def, mem);
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
if (qemuDomainDefValidateMemoryHotplug(vm->def, priv->qemuCaps, mem) < 0)
|
if (qemuDomainDefValidateMemoryHotplug(vm->def, priv->qemuCaps, mem) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@ -5611,8 +5610,7 @@ qemuDomainDetachPrepMemory(virDomainObjPtr vm,
|
|||||||
virDomainMemoryDefPtr mem;
|
virDomainMemoryDefPtr mem;
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
if (qemuDomainMemoryDeviceAlignSize(vm->def, match) < 0)
|
qemuDomainMemoryDeviceAlignSize(vm->def, match);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if ((idx = virDomainMemoryFindByDef(vm->def, match)) < 0) {
|
if ((idx = virDomainMemoryFindByDef(vm->def, match)) < 0) {
|
||||||
virReportError(VIR_ERR_DEVICE_MISSING,
|
virReportError(VIR_ERR_DEVICE_MISSING,
|
||||||
|
Loading…
Reference in New Issue
Block a user