]> git.proxmox.com Git - mirror_qemu.git/blobdiff - page_cache.c
trace: fix tcg tracing build breakage
[mirror_qemu.git] / page_cache.c
index cb8a69e964d74c8f847a94268e61dcb03511cec2..5f8578736e041b32774ad23aa69d31b9e30194a1 100644 (file)
@@ -13,9 +13,9 @@
  */
 
 #include "qemu/osdep.h"
-#include <glib.h>
 
 #include "qemu-common.h"
+#include "qemu/host-utils.h"
 #include "migration/page_cache.h"
 
 #ifdef DEBUG_CACHE
@@ -111,11 +111,8 @@ void cache_fini(PageCache *cache)
 static size_t cache_get_cache_pos(const PageCache *cache,
                                   uint64_t address)
 {
-    size_t pos;
-
     g_assert(cache->max_num_items);
-    pos = (address / cache->page_size) & (cache->max_num_items - 1);
-    return pos;
+    return (address / cache->page_size) & (cache->max_num_items - 1);
 }
 
 static CacheItem *cache_get_by_addr(const PageCache *cache, uint64_t addr)