path: root/include/qemu-common.h
diff options
authorMarkus Armbruster <armbru@redhat.com>2016-03-11 16:27:23 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-03-22 22:20:16 +0100
commite07e540aaa08718c9ff8213067a3dcef31b3e313 (patch)
treec8bf83d8132061736577456113c3c0b2fb5ad4ef /include/qemu-common.h
parenta8139632161d7546218b696cada0a4f64cc78fb7 (diff)
Move QEMU_ALIGN_*() from qemu-common.h to qemu/osdep.h
qemu-common.h should only be included by .c files. Its file comment explains why: "No header file should depend on qemu-common.h, as this would easily lead to circular header dependencies." One of the reasons for headers to include it is QEMU_ALIGN_UP() and QEMU_ALIGN_DOWN(). Move them next to ROUND_UP() in qemu/osdep.h, to facilitate removing these ill-advised includes later on. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu-common.h')
1 files changed, 0 insertions, 6 deletions
diff --git a/include/qemu-common.h b/include/qemu-common.h
index fbd999cbcd..f2727523e0 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -369,12 +369,6 @@ static inline uint8_t from_bcd(uint8_t val)
return ((val >> 4) * 10) + (val & 0x0f);
-/* Round number down to multiple */
-#define QEMU_ALIGN_DOWN(n, m) ((n) / (m) * (m))
-/* Round number up to multiple */
-#define QEMU_ALIGN_UP(n, m) QEMU_ALIGN_DOWN((n) + (m) - 1, (m))
#include "qemu/module.h"