diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-03-21 17:46:40 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-03-21 17:46:40 +0000 |
commit | 330724977b10f5b92610817e8b7d1dfed122df87 (patch) | |
tree | 5b4008e89a44bcdccda9a5b21fe15816a019ae91 /target | |
parent | 2028ab513bf0232841a909e1368309858919dbcc (diff) | |
parent | b21e2380376c470900fcadf47507f4d5ade75e85 (diff) |
Merge tag 'pull-misc-2022-03-21' of git://repo.or.cz/qemu/armbru into staging
Miscellaneous patches patches for 2022-03-21
# gpg: Signature made Mon 21 Mar 2022 14:48:16 GMT
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-misc-2022-03-21' of git://repo.or.cz/qemu/armbru:
Use g_new() & friends where that makes obvious sense
9pfs: Use g_new() & friends where that makes obvious sense
scripts/coccinelle: New use-g_new-etc.cocci
block-qdict: Fix -Werror=maybe-uninitialized build failure
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/cpu-sysemu.c | 2 | ||||
-rw-r--r-- | target/i386/hax/hax-accel-ops.c | 4 | ||||
-rw-r--r-- | target/i386/nvmm/nvmm-accel-ops.c | 4 | ||||
-rw-r--r-- | target/i386/whpx/whpx-accel-ops.c | 4 | ||||
-rw-r--r-- | target/i386/whpx/whpx-all.c | 2 | ||||
-rw-r--r-- | target/s390x/cpu-sysemu.c | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/target/i386/cpu-sysemu.c b/target/i386/cpu-sysemu.c index 37b7c562f5..e254d8ba10 100644 --- a/target/i386/cpu-sysemu.c +++ b/target/i386/cpu-sysemu.c @@ -313,7 +313,7 @@ GuestPanicInformation *x86_cpu_get_crash_info(CPUState *cs) GuestPanicInformation *panic_info = NULL; if (hyperv_feat_enabled(cpu, HYPERV_FEAT_CRASH)) { - panic_info = g_malloc0(sizeof(GuestPanicInformation)); + panic_info = g_new0(GuestPanicInformation, 1); panic_info->type = GUEST_PANIC_INFORMATION_TYPE_HYPER_V; diff --git a/target/i386/hax/hax-accel-ops.c b/target/i386/hax/hax-accel-ops.c index 136630e9b2..18114fe34d 100644 --- a/target/i386/hax/hax-accel-ops.c +++ b/target/i386/hax/hax-accel-ops.c @@ -61,8 +61,8 @@ static void hax_start_vcpu_thread(CPUState *cpu) { char thread_name[VCPU_THREAD_NAME_SIZE]; - cpu->thread = g_malloc0(sizeof(QemuThread)); - cpu->halt_cond = g_malloc0(sizeof(QemuCond)); + cpu->thread = g_new0(QemuThread, 1); + cpu->halt_cond = g_new0(QemuCond, 1); qemu_cond_init(cpu->halt_cond); snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/HAX", diff --git a/target/i386/nvmm/nvmm-accel-ops.c b/target/i386/nvmm/nvmm-accel-ops.c index f788f75289..6c46101ac1 100644 --- a/target/i386/nvmm/nvmm-accel-ops.c +++ b/target/i386/nvmm/nvmm-accel-ops.c @@ -64,8 +64,8 @@ static void nvmm_start_vcpu_thread(CPUState *cpu) { char thread_name[VCPU_THREAD_NAME_SIZE]; - cpu->thread = g_malloc0(sizeof(QemuThread)); - cpu->halt_cond = g_malloc0(sizeof(QemuCond)); + cpu->thread = g_new0(QemuThread, 1); + cpu->halt_cond = g_new0(QemuCond, 1); qemu_cond_init(cpu->halt_cond); snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/NVMM", cpu->cpu_index); diff --git a/target/i386/whpx/whpx-accel-ops.c b/target/i386/whpx/whpx-accel-ops.c index 1d30e4e2ed..dd2a9f7657 100644 --- a/target/i386/whpx/whpx-accel-ops.c +++ b/target/i386/whpx/whpx-accel-ops.c @@ -64,8 +64,8 @@ static void whpx_start_vcpu_thread(CPUState *cpu) { char thread_name[VCPU_THREAD_NAME_SIZE]; - cpu->thread = g_malloc0(sizeof(QemuThread)); - cpu->halt_cond = g_malloc0(sizeof(QemuCond)); + cpu->thread = g_new0(QemuThread, 1); + cpu->halt_cond = g_new0(QemuCond, 1); qemu_cond_init(cpu->halt_cond); snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/WHPX", cpu->cpu_index); diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index ecddf0cb91..03ba52da89 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -1382,7 +1382,7 @@ int whpx_init_vcpu(CPUState *cpu) } } - vcpu = g_malloc0(sizeof(struct whpx_vcpu)); + vcpu = g_new0(struct whpx_vcpu, 1); if (!vcpu) { error_report("WHPX: Failed to allocte VCPU context."); diff --git a/target/s390x/cpu-sysemu.c b/target/s390x/cpu-sysemu.c index 5471e01ee8..948e4bd3e0 100644 --- a/target/s390x/cpu-sysemu.c +++ b/target/s390x/cpu-sysemu.c @@ -76,7 +76,7 @@ static GuestPanicInformation *s390_cpu_get_crash_info(CPUState *cs) S390CPU *cpu = S390_CPU(cs); cpu_synchronize_state(cs); - panic_info = g_malloc0(sizeof(GuestPanicInformation)); + panic_info = g_new0(GuestPanicInformation, 1); panic_info->type = GUEST_PANIC_INFORMATION_TYPE_S390; panic_info->u.s390.core = cpu->env.core_id; |