[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH-for-9.1 25/29] hw/i386/fw_cfg: Replace smbios_defaults() by !
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH-for-9.1 25/29] hw/i386/fw_cfg: Replace smbios_defaults() by !smbios_legacy_mode() |
Date: |
Thu, 28 Mar 2024 16:54:33 +0100 |
smbios_defaults() and smbios_legacy_mode() are logical
opposite. Simplify using the latter.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/fw_cfg.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c
index ffa60a4a33..df05fe060c 100644
--- a/hw/i386/fw_cfg.c
+++ b/hw/i386/fw_cfg.c
@@ -49,11 +49,6 @@ const char *fw_cfg_arch_key_name(uint16_t key)
}
#ifdef CONFIG_SMBIOS
-static bool smbios_defaults(PCMachineState *pcms)
-{
- return pc_machine_is_pci_enabled(pcms);
-}
-
static bool smbios_legacy_mode(PCMachineState *pcms)
{
return !pc_machine_is_pci_enabled(pcms);
@@ -70,7 +65,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState
*fw_cfg,
MachineClass *mc = MACHINE_GET_CLASS(pcms);
X86CPU *cpu = X86_CPU(ms->possible_cpus->cpus[0].cpu);
- if (smbios_defaults(pcms)) {
+ if (!smbios_legacy_mode(pcms)) {
/* These values are guest ABI, do not change */
smbios_set_defaults("QEMU", mc->desc, mc->name);
}
--
2.41.0
- [RFC PATCH-for-9.1 19/29] hw/i386/pc: Pass PcPciMachineState argument to CXL helpers, (continued)
- [RFC PATCH-for-9.1 19/29] hw/i386/pc: Pass PcPciMachineState argument to CXL helpers, Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 15/29] hw/i386/pc: Move FW/pflash related fields to PcPciMachineState, Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 17/29] hw/i386/pc: Inline gigabyte_align(), Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 18/29] hw/i386/pc: Inline has_reserved_memory(), Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 16/29] hw/i386/pc: Move south-bridge related fields to PcPciMachine, Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 20/29] hw/i386/pc: Pass PcPciMachineState argument to pc_pci_hole64_start(), Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 21/29] hw/i386/fw_cfg: Include missing 'qapi-types-machine.h' header, Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 22/29] hw/i386/fw_cfg: Define fw_cfg_build_smbios() stub, Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 23/29] hw/i386/fw_cfg: Inline smbios_defaults(), Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 24/29] hw/i386/fw_cfg: Inline smbios_legacy_mode(), Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 25/29] hw/i386/fw_cfg: Replace smbios_defaults() by !smbios_legacy_mode(),
Philippe Mathieu-Daudé <=
- [RFC PATCH-for-9.1 26/29] hw/i386/fw_cfg: Factor fw_cfg_build_smbios_legacy() out, Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 27/29] hw/i386/pc: Call fw_cfg_build_smbios_legacy() in pc_machine_done(), Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 28/29] hw/i386/pc: Rename pc_init1() -> pc_piix_init(), Philippe Mathieu-Daudé, 2024/03/28
- [RFC PATCH-for-9.1 29/29] hw/i386/pc: Move ISA-only PC machine to pc_isa.c, Philippe Mathieu-Daudé, 2024/03/28