]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
system/rba: use DIV_ROUND_UP
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 26 Feb 2026 13:59:46 +0000 (14:59 +0100)
committerPeter Xu <peterx@redhat.com>
Mon, 9 Mar 2026 18:06:30 +0000 (14:06 -0400)
Mostly for readability.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20260226140001.3622334-2-marcandre.lureau@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
system/ram-block-attributes.c

index fb7c5c274677520471f40fbb2ab98f2fdd0b6ae5..9f72a6b35453663e3f1e1b2e59a660f55c7a8585 100644 (file)
@@ -401,8 +401,7 @@ RamBlockAttributes *ram_block_attributes_create(RAMBlock *ram_block)
         object_unref(OBJECT(attr));
         return NULL;
     }
-    attr->bitmap_size =
-        ROUND_UP(int128_get64(mr->size), block_size) / block_size;
+    attr->bitmap_size = DIV_ROUND_UP(int128_get64(mr->size), block_size);
     attr->bitmap = bitmap_new(attr->bitmap_size);
 
     return attr;