qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH v5 29/46] hw/mips/r4k: Constify p


From: Thomas Huth
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v5 29/46] hw/mips/r4k: Constify params_size
Date: Wed, 27 Jun 2018 15:48:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 25.06.2018 14:42, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>  hw/mips/mips_r4k.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
> index e5cf8ed1a3..fc38b4bf99 100644
> --- a/hw/mips/mips_r4k.c
> +++ b/hw/mips/mips_r4k.c
> @@ -79,8 +79,9 @@ typedef struct ResetData {
>  
>  static int64_t load_kernel(void)
>  {
> +    const size_t params_size = 264;
>      int64_t entry, kernel_high;
> -    long kernel_size, initrd_size, params_size;
> +    long kernel_size, initrd_size;
>      ram_addr_t initrd_offset;
>      uint32_t *params_buf;
>      int big_endian;
> @@ -128,7 +129,6 @@ static int64_t load_kernel(void)
>      }
>  
>      /* Store command line.  */
> -    params_size = 264;
>      params_buf = g_malloc(params_size);
>  
>      params_buf[0] = tswap32(ram_size);
> @@ -143,7 +143,7 @@ static int64_t load_kernel(void)
>      }
>  
>      rom_add_blob_fixed("params", params_buf, params_size,
> -                       (16 << 20) - 264);
> +                       (16 << 20) - params_size);
>  
>      g_free(params_buf);
>      return entry;

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

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