[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/30] hw/mips/r4k: constify params_size
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH 05/30] hw/mips/r4k: constify params_size |
Date: |
Thu, 15 Feb 2018 07:19:10 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 15.02.2018 05:28, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> hw/mips/mips_r4k.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
> index 830ee7732c..5a74c44b9a 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);
> @@ -144,7 +144,6 @@ static int64_t load_kernel(void)
>
> rom_add_blob_fixed("params", params_buf, params_size,
> (16 << 20) - 264);
> -
> g_free(params_buf);
> return entry;
> }
The last hunk is an unnecessary white-space change. Did you maybe rather
wanted to replace the 264 in the preceding line instead?
Thomas
- [Qemu-devel] [PATCH 01/30] util/cutils: extract byte-based definitions into a new header: "qemu/cunits.h", (continued)
- [Qemu-devel] [PATCH 01/30] util/cutils: extract byte-based definitions into a new header: "qemu/cunits.h", Philippe Mathieu-Daudé, 2018/02/14
- [Qemu-devel] [PATCH 02/30] hw: include "qemu/cunits.h" and clean unused "qemu/cutils.h", Philippe Mathieu-Daudé, 2018/02/14
- [Qemu-devel] [PATCH 04/30] hw/lm32/milkymist: remove unused include, Philippe Mathieu-Daudé, 2018/02/14
- [Qemu-devel] [PATCH 03/30] hw/block/nvme: include the "qemu/cutils.h" in the source file, Philippe Mathieu-Daudé, 2018/02/14
- [Qemu-devel] [PATCH 05/30] hw/mips/r4k: constify params_size, Philippe Mathieu-Daudé, 2018/02/14
- Re: [Qemu-devel] [PATCH 05/30] hw/mips/r4k: constify params_size,
Thomas Huth <=
- [Qemu-devel] [PATCH 06/30] hw/mips: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/02/14
- [Qemu-devel] [PATCH 07/30] hw/arm: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/02/14
[Qemu-devel] [PATCH 08/30] hw/i386: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/02/14
[Qemu-devel] [PATCH 09/30] hw/sparc: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/02/14
[Qemu-devel] [PATCH 10/30] hw/ppc: use the BYTE-based definitions, Philippe Mathieu-Daudé, 2018/02/14