diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2013-09-11 13:08:49 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-09-18 11:13:29 +0200 |
commit | 60b3b2a55f4b3fb72419ce7e4b44378dc56eed28 (patch) | |
tree | 6e86c7d6656208fea750e8bdb4124663c4b9e2ae /hw/display | |
parent | 9efc2d8d813b94fde0a2bad6c13850bef7636748 (diff) | |
download | qemu-60b3b2a55f4b3fb72419ce7e4b44378dc56eed28.zip qemu-60b3b2a55f4b3fb72419ce7e4b44378dc56eed28.tar.gz qemu-60b3b2a55f4b3fb72419ce7e4b44378dc56eed28.tar.bz2 |
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 <kraxel@redhat.com>
Diffstat (limited to 'hw/display')
-rw-r--r-- | hw/display/qxl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c index f0bfd2c..bcbf97a 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; } |