[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 13/17] accel: Rename 'init' method to 'init_machi
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH v2 13/17] accel: Rename 'init' method to 'init_machine' |
Date: |
Fri, 29 Aug 2014 17:31:46 -0300 |
This makes explicit the fact that the method is for machine
initialization, not just for accelerator object initialization.
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/core/accel.c | 8 ++++----
include/hw/accel.h | 2 +-
kvm-all.c | 2 +-
qtest.c | 2 +-
xen-common.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/core/accel.c b/hw/core/accel.c
index 5817c3c..55378f3 100644
--- a/hw/core/accel.c
+++ b/hw/core/accel.c
@@ -57,11 +57,11 @@ static AccelClass *accel_find(const char *opt_name)
return ac;
}
-static int accel_init(AccelClass *acc, MachineClass *mc)
+static int accel_init_machine(AccelClass *acc, MachineClass *mc)
{
int ret;
*(acc->allowed) = true;
- ret = acc->init(mc);
+ ret = acc->init_machine(mc);
if (ret < 0) {
*(acc->allowed) = false;
}
@@ -98,7 +98,7 @@ int configure_accelerator(MachineClass *mc)
acc->name);
continue;
}
- ret = accel_init(acc, mc);
+ ret = accel_init_machine(acc, mc);
if (ret < 0) {
init_failed = true;
fprintf(stderr, "failed to initialize %s: %s\n",
@@ -128,7 +128,7 @@ static void tcg_accel_class_init(ObjectClass *oc, void
*data)
{
AccelClass *ac = ACCEL_CLASS(oc);
ac->name = "tcg";
- ac->init = tcg_init;
+ ac->init_machine = tcg_init;
ac->allowed = &tcg_allowed;
}
diff --git a/include/hw/accel.h b/include/hw/accel.h
index 120ca0e..8812cda 100644
--- a/include/hw/accel.h
+++ b/include/hw/accel.h
@@ -39,7 +39,7 @@ typedef struct AccelClass {
const char *opt_name;
const char *name;
int (*available)(void);
- int (*init)(MachineClass *mc);
+ int (*init_machine)(MachineClass *mc);
bool *allowed;
} AccelClass;
diff --git a/kvm-all.c b/kvm-all.c
index 7db966e..dd03dc4 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -2221,7 +2221,7 @@ static void kvm_accel_class_init(ObjectClass *oc, void
*data)
{
AccelClass *ac = ACCEL_CLASS(oc);
ac->name = "KVM";
- ac->init = kvm_init;
+ ac->init_machine = kvm_init;
ac->allowed = &kvm_allowed;
}
diff --git a/qtest.c b/qtest.c
index 829128e..4051868 100644
--- a/qtest.c
+++ b/qtest.c
@@ -564,7 +564,7 @@ static void qtest_accel_class_init(ObjectClass *oc, void
*data)
AccelClass *ac = ACCEL_CLASS(oc);
ac->name = "QTest";
ac->available = qtest_available;
- ac->init = qtest_init_accel;
+ ac->init_machine = qtest_init_accel;
ac->allowed = &qtest_allowed;
}
diff --git a/xen-common.c b/xen-common.c
index f0b34be..246d76b 100644
--- a/xen-common.c
+++ b/xen-common.c
@@ -126,7 +126,7 @@ static void xen_accel_class_init(ObjectClass *oc, void
*data)
{
AccelClass *ac = ACCEL_CLASS(oc);
ac->name = "Xen";
- ac->init = xen_init;
+ ac->init_machine = xen_init;
ac->allowed = &xen_allowed;
}
--
1.9.3
- [Qemu-devel] [PATCH v2 03/17] accel: Create AccelType typedef, (continued)
- [Qemu-devel] [PATCH v2 03/17] accel: Create AccelType typedef, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 04/17] accel: Simplify configure_accelerator() using AccelType *acc variable, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 07/17] accel: Make AccelClass.available() optional, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 05/17] accel: Move accel name lookup to separate function, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 08/17] accel: Move KVM accel registration to kvm-all.c, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 06/17] accel: Use QOM classes for accel types, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 09/17] accel: Move Xen registration code to xen-common.c, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 10/17] accel: Move qtest accel registration to qtest.c, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 11/17] accel: Remove tcg_available() function, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 12/17] accel: Move accel init/allowed code to separate function, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 13/17] accel: Rename 'init' method to 'init_machine',
Eduardo Habkost <=
- [Qemu-devel] [PATCH v2 14/17] accel: Pass MachineState object to accel init functions, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 15/17] accel: Create accel object when initializing machine, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 16/17] accel: Save AccelState on MachineState when initializing, Eduardo Habkost, 2014/08/29
- [Qemu-devel] [PATCH v2 17/17] kvm: Make KVMState be the TYPE_KVM_ACCEL instance struct, Eduardo Habkost, 2014/08/29