Re: [PATCH] softmmu/physmem.c: Remove unneeded NULL check in qemu_ram_alloc_from_fd()

2021-08-13 Thread Liu, Jingqi
On 8/12/2021 11:06 PM, Peter Maydell wrote: In the alignment check added to qemu_ram_alloc_from_fd() in commit ce317be98db0dfdfa, the condition includes a check that 'mr' is not NULL. This check is unnecessary because we can assume that the caller always passes us a valid MemoryRegion, and in

[PATCH] softmmu/physmem.c: Remove unneeded NULL check in qemu_ram_alloc_from_fd()

2021-08-12 Thread Peter Maydell
In the alignment check added to qemu_ram_alloc_from_fd() in commit ce317be98db0dfdfa, the condition includes a check that 'mr' is not NULL. This check is unnecessary because we can assume that the caller always passes us a valid MemoryRegion, and indeed later in the function we assume mr is not NU