[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH 25/88] OpenRISC: use g_new() family of functio
From: |
Stafford Horne |
Subject: |
Re: [Qemu-trivial] [PATCH 25/88] OpenRISC: use g_new() family of functions |
Date: |
Sat, 7 Oct 2017 09:15:57 +0900 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Fri, Oct 06, 2017 at 08:49:20PM -0300, Philippe Mathieu-Daudé wrote:
> From: Marc-André Lureau <address@hidden>
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: Stafford Horne <address@hidden>
> [PMD: squashed openrisc_sim.c]
> ---
> hw/openrisc/openrisc_sim.c | 2 +-
> target/openrisc/mmu.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
> index 86bf2849c4..1eb381549c 100644
> --- a/hw/openrisc/openrisc_sim.c
> +++ b/hw/openrisc/openrisc_sim.c
> @@ -114,7 +114,7 @@ static void openrisc_sim_init(MachineState *machine)
> main_cpu_reset(cpu);
> }
>
> - ram = g_malloc(sizeof(*ram));
> + ram = g_new(MemoryRegion, 1);
> memory_region_init_ram(ram, NULL, "openrisc.ram", ram_size,
> &error_fatal);
> memory_region_add_subregion(get_system_memory(), 0, ram);
>
> diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c
> index ce2a29dd1a..4789a35b67 100644
> --- a/target/openrisc/mmu.c
> +++ b/target/openrisc/mmu.c
> @@ -247,7 +247,7 @@ hwaddr openrisc_cpu_get_phys_page_debug(CPUState *cs,
> vaddr addr)
>
> void cpu_openrisc_mmu_init(OpenRISCCPU *cpu)
> {
> - cpu->env.tlb = g_malloc0(sizeof(CPUOpenRISCTLBContext));
> + cpu->env.tlb = g_new0(CPUOpenRISCTLBContext, 1);
>
> cpu->env.tlb->cpu_openrisc_map_address_code =
> &cpu_openrisc_get_phys_nommu;
> cpu->env.tlb->cpu_openrisc_map_address_data =
> &cpu_openrisc_get_phys_nommu;
> --
> 2.14.2
>
- [Qemu-trivial] [PATCH 19/88] exec: use g_new() family of functions, (continued)
- [Qemu-trivial] [PATCH 19/88] exec: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 20/88] Migration: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 21/88] NBD: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 22/88] LM32: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 23/88] M68K: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 24/88] MIPS: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 25/88] OpenRISC: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- Re: [Qemu-trivial] [PATCH 25/88] OpenRISC: use g_new() family of functions,
Stafford Horne <=
- [Qemu-trivial] [PATCH 26/88] S390: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 28/88] disas: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 27/88] SH4: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 29/88] SPARC: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 30/88] QEMU Guest Agent: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 32/88] QObject: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06
- [Qemu-trivial] [PATCH 31/88] QMP: use g_new() family of functions, Philippe Mathieu-Daudé, 2017/10/06