From nobody Mon Feb 9 19:54:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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 1545372322116441.88485395866076; Thu, 20 Dec 2018 22:05:22 -0800 (PST) Received: from localhost ([::1]:42471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaDw0-0006Ih-Hi for importer@patchew.org; Fri, 21 Dec 2018 01:05:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaDdn-0000ZP-QZ for qemu-devel@nongnu.org; Fri, 21 Dec 2018 00:46:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaDdk-0007C4-H8 for qemu-devel@nongnu.org; Fri, 21 Dec 2018 00:46:31 -0500 Received: from ozlabs.org ([203.11.71.1]:33697) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gaDdi-0006yN-CK; Fri, 21 Dec 2018 00:46:28 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 43Ld0N1L1tz9sN1; Fri, 21 Dec 2018 16:46:11 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1545371172; bh=7GOJYmYGLu02omasQoQ5i+zxxBxSdsDxRtrEIrrGf1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YOOKzkHtqBYzYOlFqbGtAyYJ1NagFO1vf9ldHPO8WpL64xfcsa3MG2R2BZTCP7QlU hhd5qMg/oYZ7PoePI69SxpyTbJ7AWunzyO/0WjIyXkxrUR4jHEf3B6gQUz2UMp5xYU vSspSHEIqVZdSdlgtANngl8o8KB3MARhnwonyyMM= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 21 Dec 2018 16:45:37 +1100 Message-Id: <20181221054606.22007-12-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181221054606.22007-1-david@gibson.dropbear.id.au> References: <20181221054606.22007-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 11/40] sam460ex: use g_new(T, n) instead of g_malloc(sizeof(T) * n) 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: gkurz@redhat.com, lvivier@redhat.com, Greg Kurz , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Greg Kurz Because it is a recommended coding practice (see HACKING). Signed-off-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: David Gibson --- hw/ppc/sam460ex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 5aac58f36e..4b051c0950 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -430,7 +430,7 @@ static void sam460ex_init(MachineState *machine) ppc4xx_plb_init(env); =20 /* interrupt controllers */ - irqs =3D g_malloc0(sizeof(*irqs) * PPCUIC_OUTPUT_NB); + irqs =3D g_new0(qemu_irq, PPCUIC_OUTPUT_NB); irqs[PPCUIC_OUTPUT_INT] =3D ((qemu_irq *)env->irq_inputs)[PPC40x_INPUT= _INT]; irqs[PPCUIC_OUTPUT_CINT] =3D ((qemu_irq *)env->irq_inputs)[PPC40x_INPU= T_CINT]; uic[0] =3D ppcuic_init(env, irqs, 0xc0, 0, 1); --=20 2.19.2