]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - include/qemu-common.h
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
[thirdparty/qemu.git] / include / qemu-common.h
index 2e684fee7771bc56537ec9601d663957c03e7233..01d29dd45a0feaaabbc4ef3e8a5209855c1a0960 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "glib-compat.h"
 #include "qemu/option.h"
+#include "qemu/host-utils.h"
 
 /* HOST_LONG_BITS is the size of a native pointer in bits. */
 #if UINTPTR_MAX == UINT32_MAX
@@ -199,7 +200,6 @@ int qemu_strnlen(const char *s, int max_len);
  */
 char *qemu_strsep(char **input, const char *delim);
 time_t mktimegm(struct tm *tm);
-int qemu_fls(int i);
 int qemu_fdatasync(int fd);
 int fcntl_setfl(int fd, int flag);
 int qemu_parse_fd(const char *param);
@@ -425,21 +425,6 @@ static inline uint8_t from_bcd(uint8_t val)
 /* Round number up to multiple */
 #define QEMU_ALIGN_UP(n, m) QEMU_ALIGN_DOWN((n) + (m) - 1, (m))
 
-static inline bool is_power_of_2(uint64_t value)
-{
-    if (!value) {
-        return 0;
-    }
-
-    return !(value & (value - 1));
-}
-
-/* round down to the nearest power of 2*/
-int64_t pow2floor(int64_t value);
-
-/* round up to the nearest power of 2 (0 if overflow) */
-uint64_t pow2ceil(uint64_t value);
-
 #include "qemu/module.h"
 
 /*