[PATCH v1 09/10] qemu_domain.c: remove qemuDomainMemoryDeviceAlignSize()

Daniel Henrique Barboza danielhb413 at gmail.com
Wed Nov 11 22:07:24 UTC 2020


This function has no callers left after we moved the mem module
alignment to PostParse callbacks.

Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
---
 src/qemu/qemu_domain.c | 20 --------------------
 src/qemu/qemu_domain.h |  2 --
 2 files changed, 22 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 7067d49d7a..8d69be682e 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -8130,26 +8130,6 @@ qemuDomainAlignMemorySizes(virDomainDefPtr def)
 }
 
 
-/**
- * qemuDomainMemoryDeviceAlignSize:
- * @mem: memory device definition object
- *
- * Aligns the size of the memory module as qemu enforces it. The size is updated
- * inplace. Default rounding is now to 1 MiB (qemu requires rounding to page,
- * size so this should be safe).
- */
-int
-qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
-                                virDomainMemoryDefPtr mem)
-{
-    if (!ARCH_IS_PPC64(def->os.arch))
-        mem->size = VIR_ROUND_UP(mem->size,
-                                 qemuDomainGetMemorySizeAlignment(def));
-
-    return 0;
-}
-
-
 /**
  * qemuDomainGetMonitor:
  * @vm: domain object
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index ca041e207b..8e6fde412e 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -757,8 +757,6 @@ bool qemuDomainHasBlockjob(virDomainObjPtr vm, bool copy_only)
     ATTRIBUTE_NONNULL(1);
 
 int qemuDomainAlignMemorySizes(virDomainDefPtr def);
-int qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
-                                    virDomainMemoryDefPtr mem);
 
 virDomainChrDefPtr qemuFindAgentConfig(virDomainDefPtr def);
 
-- 
2.26.2




More information about the libvir-list mailing list