Re: [PATCH v4 04/11] hw/riscv/boot.c: exit early if filename is NULL in load_(kernel|initrd)

2022-12-30 Thread Philippe Mathieu-Daudé
On 30/12/22 09:58, Bin Meng wrote: On Fri, Dec 30, 2022 at 2:21 AM Daniel Henrique Barboza wrote: riscv_load_kernel() and riscv_load_initrd() works under the assumption that 'kernel_filename' and 'filename' are not NULL. We should do the same in riscv_load_firmware() Can be done on top

Re: [PATCH v4 04/11] hw/riscv/boot.c: exit early if filename is NULL in load_(kernel|initrd)

2022-12-30 Thread Bin Meng
On Fri, Dec 30, 2022 at 2:21 AM Daniel Henrique Barboza wrote: > > riscv_load_kernel() and riscv_load_initrd() works under the assumption > that 'kernel_filename' and 'filename' are not NULL. We should do the same in riscv_load_firmware() > > This is currently the case since all callers of both

[PATCH v4 04/11] hw/riscv/boot.c: exit early if filename is NULL in load_(kernel|initrd)

2022-12-29 Thread Daniel Henrique Barboza
riscv_load_kernel() and riscv_load_initrd() works under the assumption that 'kernel_filename' and 'filename' are not NULL. This is currently the case since all callers of both functions are checking for NULL before calling them. Put an assert in both to make sure that a NULL value for both cases