From nobody Tue Feb 10 23:00:40 2026 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1507335637326878.493125643429; Fri, 6 Oct 2017 17:20:37 -0700 (PDT) Received: from localhost ([::1]:47685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0cr4-0007Ew-4w for importer@patchew.org; Fri, 06 Oct 2017 20:20:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0cQN-0000Lu-V8 for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:53:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0cQK-0006Dv-U5 for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:53:00 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:35189) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0cQK-0006Di-PQ; Fri, 06 Oct 2017 19:52:56 -0400 Received: by mail-qk0-x241.google.com with SMTP id w63so11297253qkd.2; Fri, 06 Oct 2017 16:52:56 -0700 (PDT) Received: from yoga.lan ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id g1sm1705226qta.95.2017.10.06.16.52.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 16:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P/cUAO12wpwS/gf8FMOaiId1KFNcT/9XDXvNKKjjZMI=; b=FExwCZAToglZKm/SPomyn9JS0Lyy4e+9sfmCKb/TtULv1pYGc5sW6WTr5mOq3q4lp/ vhSnsJb0Hu8xgr4HPLb/p0RY+wjXw1w0kgapC6wiMusETk5mAw9yX3BJk3MszJoWL4cF 5UrznbqoGTVWnlZo6JBZm6TrC8g/iXCfqPNqQn5xqThl0kRoZI2y+R3lexfzyuH2Uy6J ILzLWtcmJQdwNsdpH8pVaxW5GGFKQNT4colF1mTlDcNLXFz9IMrfveIemcCtSzN0nAoh 2x3cjTweIL3Eked4XB5QmEn2DD61bJUWtsdLbo2+cSnHSC2NG+ueELPw6OBuN1T/0na1 /bGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=P/cUAO12wpwS/gf8FMOaiId1KFNcT/9XDXvNKKjjZMI=; b=L2QhtkxgJ5I+o9nJiLDQTHUnNFwmcdgsRmQGNPvwfZsV1dXr6jRUvKFjr7E54tv/Gt 4u8iPfJC/TnDFumpUOU/tqSS6d6NMXX2FZyNWB1Wf1xHeDdS/6IYcO27eVKAZxcydTxK VM+Z9WZ9ifb5Gh7Banl0RmhEH7Z+xe5QCwbIYQLO0XNRBiEqZo2U1xKUpK1naHeiztY7 GYGYWrmNxD8QbKZVb61U+c/rd7DWjLpNm83dZHLVBXlhivRXoUjE5nUogmTmkZlmH4JC 5MjfJWyKp18tbpeFDEis7ZmYZipxufYIUQehn/CIwDoYXz9QrnDqGT3Lf3HzBHuGqEuW BHlg== X-Gm-Message-State: AMCzsaXFxvJZE5kbYlp+akYOFknNAYemuhy+yFL6allHE0hzXoqImACi c7im6uysoeIHUq41UwkuFWo= X-Google-Smtp-Source: AOwi7QA+jeo0ORx1EiwqooNLSXQ6WHH6zEZU8ivvRIsm8T51hCdiWhL08LbADbuOnOFDw5HnySFFiw== X-Received: by 10.55.127.70 with SMTP id a67mr696688qkd.90.1507333976226; Fri, 06 Oct 2017 16:52:56 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Markus Armbruster , Eric Blake , Paolo Bonzini , Richard Henderson , Eduardo Habkost Date: Fri, 6 Oct 2017 20:49:36 -0300 Message-Id: <20171006235023.11952-42-f4bug@amsat.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171006235023.11952-1-f4bug@amsat.org> References: <20171006235023.11952-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH 41/88] target/i386: use g_new() family of functions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu trival , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_6 Z_629925259 SPT_0 Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Philippe Mathieu-Daud=C3=A9 [PMD: added more changes and hax] --- target/i386/cpu.c | 6 +++--- target/i386/hax-all.c | 4 ++-- target/i386/hax-mem.c | 2 +- target/i386/hyperv.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 98732cd65f..236a4115cd 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -2344,7 +2344,7 @@ static void x86_cpu_definition_entry(gpointer data, g= pointer user_data) CpuDefinitionInfoList *entry; CpuDefinitionInfo *info; =20 - info =3D g_malloc0(sizeof(*info)); + info =3D g_new0(CpuDefinitionInfo, 1); info->name =3D x86_cpu_class_get_model_name(cc); x86_cpu_class_check_missing_features(cc, &info->unavailable_features); info->has_unavailable_features =3D true; @@ -2353,7 +2353,7 @@ static void x86_cpu_definition_entry(gpointer data, g= pointer user_data) info->has_migration_safe =3D true; info->q_static =3D cc->static_model; =20 - entry =3D g_malloc0(sizeof(*entry)); + entry =3D g_new0(CpuDefinitionInfoList, 1); entry->value =3D info; entry->next =3D *cpu_list; *cpu_list =3D entry; @@ -3933,7 +3933,7 @@ static GuestPanicInformation *x86_cpu_get_crash_info(= CPUState *cs) GuestPanicInformation *panic_info =3D NULL; =20 if (env->features[FEAT_HYPERV_EDX] & HV_GUEST_CRASH_MSR_AVAILABLE) { - panic_info =3D g_malloc0(sizeof(GuestPanicInformation)); + panic_info =3D g_new0(GuestPanicInformation, 1); =20 panic_info->type =3D GUEST_PANIC_INFORMATION_TYPE_HYPER_V; =20 diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index 3ce6950296..8f4368fe01 100644 --- a/target/i386/hax-all.c +++ b/target/i386/hax-all.c @@ -155,7 +155,7 @@ int hax_vcpu_create(int id) return 0; } =20 - vcpu =3D g_malloc(sizeof(struct hax_vcpu_state)); + vcpu =3D g_new(struct hax_vcpu_state, 1); if (!vcpu) { fprintf(stderr, "Failed to alloc vcpu state\n"); return -ENOMEM; @@ -251,7 +251,7 @@ struct hax_vm *hax_vm_create(struct hax_state *hax) return hax->vm; } =20 - vm =3D g_malloc(sizeof(struct hax_vm)); + vm =3D g_new(struct hax_vm, 1); if (!vm) { return NULL; } diff --git a/target/i386/hax-mem.c b/target/i386/hax-mem.c index 27a0d214f2..826f7ca501 100644 --- a/target/i386/hax-mem.c +++ b/target/i386/hax-mem.c @@ -82,7 +82,7 @@ static void hax_insert_mapping_before(HAXMapping *next, u= int64_t start_pa, { HAXMapping *entry; =20 - entry =3D g_malloc0(sizeof(*entry)); + entry =3D g_new0(HAXMapping, 1); entry->start_pa =3D start_pa; entry->size =3D size; entry->host_va =3D host_va; diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index a050c9d2d1..a427602e58 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -78,7 +78,7 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vcpu_id, u= int32_t sint, HvSintRoute *sint_route; int r, gsi; =20 - sint_route =3D g_malloc0(sizeof(*sint_route)); + sint_route =3D g_new0(HvSintRoute, 1); r =3D event_notifier_init(&sint_route->sint_set_notifier, false); if (r) { goto err; --=20 2.14.2