qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 08/15] mips: remove bios_name


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 08/15] mips: remove bios_name
Date: Tue, 27 Oct 2020 15:40:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 10/26/20 3:30 PM, Paolo Bonzini wrote:
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/mips/fuloong2e.c | 6 +++---
>  hw/mips/jazz.c      | 6 +++---
>  hw/mips/malta.c     | 6 +++---
>  hw/mips/mipssim.c   | 6 +++---
>  hw/mips/r4k.c       | 4 +---
>  5 files changed, 13 insertions(+), 15 deletions(-)
...
> diff --git a/hw/mips/r4k.c b/hw/mips/r4k.c
> index 3830854342..b27be138a4 100644
> --- a/hw/mips/r4k.c
> +++ b/hw/mips/r4k.c
> @@ -168,6 +168,7 @@ static const int sector_len = 32 * KiB;
>  static
>  void mips_r4k_init(MachineState *machine)
>  {
> +    const char *bios_name = machine->firmware ?: BIOS_FILENAME;

Don't we have a "redefinition of global variable" warning here?

Anyway,
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

>      const char *kernel_filename = machine->kernel_filename;
>      const char *kernel_cmdline = machine->kernel_cmdline;
>      const char *initrd_filename = machine->initrd_filename;
> @@ -221,9 +222,6 @@ void mips_r4k_init(MachineState *machine)
>       * run.
>       */
>  
> -    if (bios_name == NULL) {
> -        bios_name = BIOS_FILENAME;
> -    }
>      filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
>      if (filename) {
>          bios_size = get_image_size(filename);
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]