From 60b3b2a55f4b3fb72419ce7e4b44378dc56eed28 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 11 Sep 2013 13:08:49 +0200 Subject: qxl: simplify qxl_rom_size Nowdays rom size is fixed at 8192 for live migration compat reasons. So we can ditch the pointless math trying to calculate the size needed. Also make the size sanity check fail at compile time not runtime. Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/display') diff --git a/hw/display/qxl.c b/hw/display/qxl.c index f0bfd2cdf7..bcbf97aceb 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -313,9 +313,7 @@ static ram_addr_t qxl_rom_size(void) sizeof(qxl_modes); uint32_t rom_size = 8192; /* two pages */ - required_rom_size = MAX(required_rom_size, TARGET_PAGE_SIZE); - required_rom_size = msb_mask(required_rom_size * 2 - 1); - assert(required_rom_size <= rom_size); + QEMU_BUILD_BUG_ON(required_rom_size > rom_size); return rom_size; } -- cgit v1.2.1