Skip to contentSkip to conversation

hw/i386/pc: Clean up pc_machine_initfn

PATCH In review Suravee Suthikulpanit 2 participants 2 messages Jun 9, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/i386/pc: Clean up pc_machine_initfn

To use the newly introduced PC machine class local variable.

---
 hw/i386/pc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc.c +1 -1
index 33ffb03a32..f8d105e829 100644
@@ -1864,7 +1864,7 @@ static void pc_machine_initfn(Object *obj)
     pcms->smbios_entry_point_type = pcmc->default_smbios_ep_type;
 
     /* acpi build is enabled by default if machine supports it */
-    pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build;
+    pcms->acpi_build_enabled = pcmc->has_acpi_build;
     pcms->smbus_enabled = true;
     pcms->sata_enabled = true;
     pcms->i8042_enabled = true;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 3 lines · Suravee Suthikulpanit

To use the newly introduced PC machine class local variable.

"Suggested-by"

Quoted 18 lines
---
  hw/i386/pc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/i386/pc.c +1 -1
index 33ffb03a32..f8d105e829 100644
@@ -1864,7 +1864,7 @@ static void pc_machine_initfn(Object *obj)
      pcms->smbios_entry_point_type = pcmc->default_smbios_ep_type;
 
      /* acpi build is enabled by default if machine supports it */
-    pcms->acpi_build_enabled = PC_MACHINE_GET_CLASS(pcms)->has_acpi_build;
+    pcms->acpi_build_enabled = pcmc->has_acpi_build;
      pcms->smbus_enabled = true;
      pcms->sata_enabled = true;
      pcms->i8042_enabled = true;