Re: [PATCH v2 4/5] hw/intc/apic: Rename x86_cpu_apic_create() -> x86_cpu_apic_new()

2023-10-05 Thread Paolo Bonzini
On 10/3/23 10:27, Philippe Mathieu-Daudé wrote: -x86_cpu_apic_create(cpu, _err); -if (local_err != NULL) { -goto out; -} +x86_cpu_apic_new(cpu); I don't like this, "*_new" is generally for functions that return what they create. Patch 2 is scary

Re: [PATCH v2 4/5] hw/intc/apic: Rename x86_cpu_apic_create() -> x86_cpu_apic_new()

2023-10-03 Thread Peter Xu
On Tue, Oct 03, 2023 at 10:27:27AM +0200, Philippe Mathieu-Daudé wrote: > x86_cpu_apic_create()'s Error** parameter is unused, drop it. > > While there is no convention, QDev methods are usually named > with _new() / _realize() suffixes. Rename as appropriate. > > Signed-off-by: Philippe

[PATCH v2 4/5] hw/intc/apic: Rename x86_cpu_apic_create() -> x86_cpu_apic_new()

2023-10-03 Thread Philippe Mathieu-Daudé
x86_cpu_apic_create()'s Error** parameter is unused, drop it. While there is no convention, QDev methods are usually named with _new() / _realize() suffixes. Rename as appropriate. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu-internal.h | 2 +- hw/intc/apic_common.c | 2 +-