qemu-devel
[Top][All Lists]
Advanced

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

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


From: Paolo Bonzini
Subject: Re: [PATCH v2 4/5] hw/intc/apic: Rename x86_cpu_apic_create() -> x86_cpu_apic_new()
Date: Fri, 6 Oct 2023 01:00:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 10/3/23 10:27, Philippe Mathieu-Daudé wrote:
-        x86_cpu_apic_create(cpu, &local_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 with the newly-introduced possible failure, but I suppose it's safer if you reason that any problem will occur at startup, not at hotplug time for example.

Paolo




reply via email to

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