[PATCH v2 2/9] hw/vexpress.c: Remove forced cast to u64
Peter Xu <[email protected]>
| Newsgroups | gmane.comp.emulators.qemu |
|---|---|
| Message-ID | <[email protected]> |
Now since ram_addr_t has switched to u64, remove the forced cast as not needed. Suggested-by: Peter Maydell <[email protected]> Signed-off-by: Peter Xu <[email protected]> --- hw/arm/vexpress.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index f26d8c6f8d..a6ce426356 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -363,16 +363,9 @@ static void a15_daughterboard_init(VexpressMachineState *vms, MachineState *machine = MACHINE(vms); MemoryRegion *sysmem = get_system_memory(); - { - /* We have to use a separate 64 bit variable here to avoid the gcc - * "comparison is always false due to limited range of data type" - * warning if we are on a host where ram_addr_t is 32 bits. - */ - uint64_t rsz = ram_size; - if (rsz > (30ULL * 1024 * 1024 * 1024)) { - error_report("vexpress-a15: cannot model more than 30GB RAM"); - exit(1); - } + if (ram_size > (30ULL * 1024 * 1024 * 1024)) { + error_report("vexpress-a15: cannot model more than 30GB RAM"); + exit(1); } /* RAM is from 0x80000000 upwards; there is no low-memory alias for it. */ -- 2.54.0