summaryrefslogtreecommitdiffstats
path: root/hw/i386/pc_piix.c
diff options
context:
space:
mode:
authorMarc-André Lureau2018-12-12 16:36:30 +0100
committerMarc-André Lureau2019-01-07 13:18:42 +0100
commit8995dd9009a4f0845393c102098dc94e14806c37 (patch)
tree0b2e85cd0acce6dabe85b68109f027e47011bd0d /hw/i386/pc_piix.c
parentcompat: replace PC_COMPAT_2_4 & HW_COMPAT_2_4 macros (diff)
downloadqemu-8995dd9009a4f0845393c102098dc94e14806c37.tar.gz
qemu-8995dd9009a4f0845393c102098dc94e14806c37.tar.xz
qemu-8995dd9009a4f0845393c102098dc94e14806c37.zip
compat: replace PC_COMPAT_2_3 & HW_COMPAT_2_3 macros
Use static arrays instead. I decided to rename the conflicting pc_compat_2_3() function with pc_compat_2_3_fn(). Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/i386/pc_piix.c')
-rw-r--r--hw/i386/pc_piix.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 125ab600ef..5b03f9ef80 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -310,7 +310,7 @@ static void pc_init1(MachineState *machine,
* HW_COMPAT_*, PC_COMPAT_*, or * pc_*_machine_options().
*/
-static void pc_compat_2_3(MachineState *machine)
+static void pc_compat_2_3_fn(MachineState *machine)
{
PCMachineState *pcms = PC_MACHINE(machine);
if (kvm_enabled()) {
@@ -320,7 +320,7 @@ static void pc_compat_2_3(MachineState *machine)
static void pc_compat_2_2(MachineState *machine)
{
- pc_compat_2_3(machine);
+ pc_compat_2_3_fn(machine);
}
static void pc_compat_2_1(MachineState *machine)
@@ -566,16 +566,13 @@ DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL,
static void pc_i440fx_2_3_machine_options(MachineClass *m)
{
- static GlobalProperty compat[] = {
- PC_COMPAT_2_3
- };
-
pc_i440fx_2_4_machine_options(m);
m->hw_version = "2.3.0";
- compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat));
+ compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len);
+ compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len);
}
-DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3,
+DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn,
pc_i440fx_2_3_machine_options);
static void pc_i440fx_2_2_machine_options(MachineClass *m)