[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.1 v2 11/21] hw/smbios: Remove 'smbios_uuid_encoded', simpli
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-9.1 v2 11/21] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() |
Date: |
Wed, 27 Mar 2024 10:51:13 +0100 |
'smbios_encode_uuid' is always true, remove it,
simplifying smbios_encode_uuid().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/smbios/smbios.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 8261eb716f..3b7703489d 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -30,7 +30,6 @@
#include "hw/pci/pci_device.h"
#include "smbios_build.h"
-static const bool smbios_uuid_encoded = true;
/*
* SMBIOS tables provided by user with '-smbios file=<foo>' option
*/
@@ -600,11 +599,9 @@ static void smbios_build_type_0_table(void)
static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in)
{
memcpy(uuid, in, 16);
- if (smbios_uuid_encoded) {
- uuid->time_low = bswap32(uuid->time_low);
- uuid->time_mid = bswap16(uuid->time_mid);
- uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version);
- }
+ uuid->time_low = bswap32(uuid->time_low);
+ uuid->time_mid = bswap16(uuid->time_mid);
+ uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version);
}
static void smbios_build_type_1_table(void)
--
2.41.0
- [PATCH-for-9.1 v2 06/21] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug', (continued)
- [PATCH-for-9.1 v2 06/21] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug', Philippe Mathieu-Daudé, 2024/03/27
- [PATCH-for-9.1 v2 07/21] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine, Philippe Mathieu-Daudé, 2024/03/27
- [PATCH-for-9.1 v2 08/21] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h', Philippe Mathieu-Daudé, 2024/03/27
- [PATCH-for-9.1 v2 09/21] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded, Philippe Mathieu-Daudé, 2024/03/27
- [PATCH-for-9.1 v2 10/21] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults(), Philippe Mathieu-Daudé, 2024/03/27
- [PATCH-for-9.1 v2 11/21] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid(),
Philippe Mathieu-Daudé <=
- [PATCH-for-9.1 v2 12/21] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm, Philippe Mathieu-Daudé, 2024/03/27
- [PATCH-for-9.1 v2 13/21] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug(), Philippe Mathieu-Daudé, 2024/03/27
- [PATCH-for-9.1 v2 14/21] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug(), Philippe Mathieu-Daudé, 2024/03/27
- [PATCH-for-9.1 v2 15/21] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine, Philippe Mathieu-Daudé, 2024/03/27