qemu-e2k/hw/i386
Markus Armbruster b21e238037 Use g_new() & friends where that makes obvious sense
g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
for two reasons.  One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.

This commit only touches allocations with size arguments of the form
sizeof(T).

Patch created mechanically with:

    $ spatch --in-place --sp-file scripts/coccinelle/use-g_new-etc.cocci \
	     --macro-file scripts/cocci-macro-file.h FILES...

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20220315144156.1595462-4-armbru@redhat.com>
Reviewed-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
2022-03-21 15:44:44 +01:00
..
kvm i386/kvm: Replace abs64() with uabs64() from host-utils 2021-09-29 19:37:38 +10:00
xen Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
Kconfig hw/i386/pc: Allow instantiating a virtio-iommu device 2021-11-01 18:49:10 -04:00
acpi-build.c hw/i386/acpi-build: Avoid 'sun' identifier 2022-03-18 11:32:13 +00:00
acpi-build.h hw/acpi/ich9: Enable ACPI PCI hot-plug 2021-07-16 04:33:35 -04:00
acpi-common.c acpi: x86: madt: use build_append_int_noprefix() API to compose MADT table 2021-10-05 17:30:57 -04:00
acpi-common.h misc: Correct relative include path 2021-06-05 21:10:42 +02:00
acpi-microvm.c hw/acpi/microvm: turn on 8042 bit in FADT boot architecture flags if present 2022-03-07 17:43:14 -05:00
acpi-microvm.h microvm/acpi: add minimal acpi support 2020-09-17 14:16:19 +02:00
amd_iommu.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
amd_iommu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e820_memory_layout.c hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
e820_memory_layout.h hw/i386/pc: Extract e820 memory layout code 2019-09-16 17:13:07 +02:00
fw_cfg.c hw/i386/fw_cfg: Set SGX bits in feature control fw_cfg accordingly 2021-09-30 15:30:24 +02:00
fw_cfg.h acpi: factor out fw_cfg_add_acpi_dsdt() 2020-06-24 17:18:28 -04:00
generic_event_device_x86.c acpi: ged: add x86 device variant. 2020-09-17 14:16:19 +02:00
intel_iommu.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
intel_iommu_internal.h intel_iommu: support snoop control 2022-03-06 05:08:23 -05:00
kvmvapic.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
meson.build microvm: add device tree support. 2021-11-02 17:24:17 +01:00
microvm-dt.c microvm: check g_file_set_contents() return value 2021-11-22 11:14:28 +01:00
microvm-dt.h microvm: add device tree support. 2021-11-02 17:24:17 +01:00
microvm.c * Build system fixes and cleanups 2021-11-03 13:07:30 -04:00
multiboot.c target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types 2021-11-02 15:57:27 +01:00
multiboot.h target/i386: use DMA-enabled multiboot ROM for new-enough QEMU machine types 2021-11-02 15:57:27 +01:00
pc.c pci: drop COMPAT_PROP_PCP for 2.0 machine types 2022-03-06 05:28:55 -05:00
pc_piix.c hw/i386/pc_piix: Mark the machine types from version 1.4 to 1.7 as deprecated 2022-03-06 05:08:23 -05:00
pc_q35.c hw/i386: expose a "smbios-entry-point-type" PC machine property 2022-01-07 05:19:55 -05:00
pc_sysfw.c target/i386/sev: Declare system-specific functions in 'sev.h' 2021-10-13 10:47:49 +02:00
pc_sysfw_ovmf-stubs.c hw/i386: Introduce X86_FW_OVMF Kconfig symbol 2021-07-14 22:28:58 +02:00
pc_sysfw_ovmf.c hw/i386: Replace magic number with field length calculation 2022-03-06 05:08:23 -05:00
port92.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
sgx-epc.c Mark remaining global TypeInfo instances as const 2022-02-21 13:30:20 +00:00
sgx-stub.c numa: Enable numa for SGX EPC sections 2021-12-10 09:47:18 +01:00
sgx.c qapi: Cleanup SGX related comments and restore @section-size 2022-01-28 11:13:33 +01:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vmmouse.c hw/i386/vmmouse: Require 'i8042' property to be set 2021-12-18 10:57:37 +01:00
vmport.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
x86-iommu-stub.c hw/i386/pc: Remove x86_iommu_get_type() 2021-11-01 18:49:10 -04:00
x86-iommu.c hw/i386/pc: Move IOMMU singleton into PCMachineState 2021-11-01 18:49:10 -04:00
x86.c x86: cleanup unused compat_apic_id_mode 2022-03-06 05:08:23 -05:00