]> git.proxmox.com Git - mirror_qemu.git/blobdiff - page_cache.c
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
[mirror_qemu.git] / page_cache.c
index 37a66e497b06cddbfafb25bbab22c8008484c9dc..5f8578736e041b32774ad23aa69d31b9e30194a1 100644 (file)
@@ -13,7 +13,6 @@
  */
 
 #include "qemu/osdep.h"
-#include <glib.h>
 
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
@@ -112,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)