[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 35/41] hw/i386: Make x86_cpu_new() private in x86.c
- To: Paolo Bonzini <pbonzini@xxxxxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Yanan Wang <wangyanan55@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, "Michael S . Tsirkin" <mst@xxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Daniel Henrique Barboza <danielhb413@xxxxxxxxx>, Igor Mammedov <imammedo@xxxxxxxxxx>, Cédric Le Goater <clg@xxxxxxxx>, Frédéric Barrat <fbarrat@xxxxxxxxxxxxx>, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>, Harsh Prateek Bora <harshpb@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>, Peter Maydell <peter.maydell@xxxxxxxxxx>, Alistair Francis <alistair@xxxxxxxxxxxxx>, "Edgar E . Iglesias" <edgar.iglesias@xxxxxxxxx>, Daniel P . Berrangé <berrange@xxxxxxxxxx>, Bin Meng <bin.meng@xxxxxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Weiwei Li <liwei1518@xxxxxxxxx>, Liu Zhiwei <zhiwei_liu@xxxxxxxxxxxxxxxxx>, qemu-devel@xxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, qemu-ppc@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, qemu-arm@xxxxxxxxxx, qemu-riscv@xxxxxxxxxx, qemu-s390x@xxxxxxxxxx
- From: Zhao Liu <zhao1.liu@xxxxxxxxxxxxxxx>
- Date: Thu, 30 Nov 2023 22:41:57 +0800
- Cc: Nina Schoetterl-Glausch <nsg@xxxxxxxxxxxxx>, Thomas Huth <thuth@xxxxxxxxxx>, Zhiyuan Lv <zhiyuan.lv@xxxxxxxxx>, Zhenyu Wang <zhenyu.z.wang@xxxxxxxxx>, Yongwei Ma <yongwei.ma@xxxxxxxxx>, Zhao Liu <zhao1.liu@xxxxxxxxx>
- Delivery-date: Thu, 30 Nov 2023 14:39:44 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Zhao Liu <zhao1.liu@xxxxxxxxx>
x86_cpu_new() is only invoked in x86.c. Declear it as static in x86.c.
Signed-off-by: Zhao Liu <zhao1.liu@xxxxxxxxx>
---
hw/i386/x86.c | 3 ++-
include/hw/i386/x86.h | 2 --
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index b3d054889bba..d9293846db64 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -95,7 +95,8 @@ uint32_t x86_cpu_apic_id_from_index(X86MachineState *x86ms,
}
-void x86_cpu_new(X86MachineState *x86ms, int64_t apic_id, Error **errp)
+static void x86_cpu_new(X86MachineState *x86ms, int64_t apic_id,
+ Error **errp)
{
Object *cpu = object_new(MACHINE(x86ms)->cpu_type);
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index da19ae15463a..19e9f93fe286 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -97,8 +97,6 @@ OBJECT_DECLARE_TYPE(X86MachineState, X86MachineClass,
X86_MACHINE)
uint32_t x86_cpu_apic_id_from_index(X86MachineState *pcms,
unsigned int cpu_index);
-
-void x86_cpu_new(X86MachineState *pcms, int64_t apic_id, Error **errp);
void x86_cpus_init(X86MachineState *pcms, int default_cpu_version);
CpuInstanceProperties x86_cpu_index_to_props(MachineState *ms,
unsigned cpu_index);
--
2.34.1
|