From patchwork Fri Oct 6 23:49:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 822793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kzgRpWxT"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y86Kw0nJnz9t3R for ; Sat, 7 Oct 2017 11:08:36 +1100 (AEDT) Received: from localhost ([::1]:47614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0cfS-0004xy-3J for incoming@patchwork.ozlabs.org; Fri, 06 Oct 2017 20:08:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0cPK-0007rV-En for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:51:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0cPJ-0005OO-Hn for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:51:54 -0400 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:44688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0cPJ-0005Nw-DQ; Fri, 06 Oct 2017 19:51:53 -0400 Received: by mail-qt0-x244.google.com with SMTP id v28so25500449qtv.1; Fri, 06 Oct 2017 16:51:53 -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=7ChP/X3F7l2FIOjI9t12T0W22s/6umZOBD0cRFaavIk=; b=kzgRpWxTimwklnJxSEw6ST+/z0rzFNDw1IuryW4Xw9C6bNK9wSsaF+dWoxv9yh56SD +/H+u16CGlV7BDUuqYq3cRczcwNVdg6nw2fu0ZHfArL8rMqd+YCtzh9siaNBkX9rKxAI D8piijA3mQhH0KO5D5rPegJiQNKbLUZdZovWo4Ypc3wZCXiVK0KWTwODCDOxgT0bhYT3 R+4EeVuCwVEttVRa6Wtc4kwcg6IDLJyqvNeGi3AOsUVeG15oCWGrVamnnv3CSvgzPZ0q lejn5x/KKCC3o3+9YEZynWxTqzjE9mpAkd5zJGP5yujPxtsgy3hcrWZSCGCArjrXnMmo jO0A== 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=7ChP/X3F7l2FIOjI9t12T0W22s/6umZOBD0cRFaavIk=; b=HIS3/nMfCtuZ1Lxt6t+1iFi9wQbJEr30Bco1G+kK6kHBsZFkdOJpVRL/OUmTWKQrmh M/LWmQA89tcMphsfQXCQPr0GS1Rm3rv0eXLGzVHLASxOv7fBeXhIGsPCnuIyE0Gbt4l/ 16i3xQEHYm9UrNOQ4MnrVx3E3lmm90QMTRNga5TYsHMCEey1XheZuy9P/2+9sYK1Sgy2 +boeD/YlbAimvGkWFaeUnXcn8uKOrBrBHmpRzEzQND17XNAgr52nHpbZfH2839LCl0G3 JW3zVdBPEwoF/dKhO1qeSJsyaupsPaa3Q+EJveXeEjUHK1/tebdkCWJJjPkCt4g/VmSP iycQ== X-Gm-Message-State: AMCzsaVZhtiike/J5u3ly9SZ4jQkx6+9TK8P6KoziRFB6tRSht5WbhBK yCyzaSon1i2YgeMOqljkjTM= X-Google-Smtp-Source: AOwi7QB6CGTFEnMIQ5qNZv0T3XF0SIIwUFyMg+mYJstm15z2sYiU1Ho1L30SGnrpbDgZgDpu6Sz6Dg== X-Received: by 10.237.36.145 with SMTP id t17mr5204456qtc.162.1507333912865; Fri, 06 Oct 2017 16:51:52 -0700 (PDT) Received: from yoga.lan ([181.93.89.178]) by smtp.gmail.com with ESMTPSA id g1sm1705226qta.95.2017.10.06.16.51.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2017 16:51:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Markus Armbruster , Eric Blake , Thomas Huth Date: Fri, 6 Oct 2017 20:49:18 -0300 Message-Id: <20171006235023.11952-24-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 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::244 Subject: [Qemu-devel] [PATCH 23/88] M68K: 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_Lureau?= , qemu trival , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Philippe Mathieu-Daudé [PMD: squashed commits] Reviewed-by: Thomas Huth --- hw/m68k/mcf5206.c | 4 ++-- hw/m68k/mcf5208.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/m68k/mcf5206.c b/hw/m68k/mcf5206.c index b81901fdfd..df45e99547 100644 --- a/hw/m68k/mcf5206.c +++ b/hw/m68k/mcf5206.c @@ -137,7 +137,7 @@ static m5206_timer_state *m5206_timer_init(qemu_irq irq) m5206_timer_state *s; QEMUBH *bh; - s = (m5206_timer_state *)g_malloc0(sizeof(m5206_timer_state)); + s = g_new0(m5206_timer_state, 1); bh = qemu_bh_new(m5206_timer_trigger, s); s->timer = ptimer_init(bh, PTIMER_POLICY_DEFAULT); s->irq = irq; @@ -533,7 +533,7 @@ qemu_irq *mcf5206_init(MemoryRegion *sysmem, uint32_t base, M68kCPU *cpu) m5206_mbar_state *s; qemu_irq *pic; - s = (m5206_mbar_state *)g_malloc0(sizeof(m5206_mbar_state)); + s = g_new0(m5206_mbar_state, 1); memory_region_init_io(&s->iomem, NULL, &m5206_mbar_ops, s, "mbar", 0x00001000); diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c index b9dde75106..9b93af5fbd 100644 --- a/hw/m68k/mcf5208.c +++ b/hw/m68k/mcf5208.c @@ -183,7 +183,7 @@ static void mcf5208_sys_init(MemoryRegion *address_space, qemu_irq *pic) memory_region_add_subregion(address_space, 0xfc0a8000, iomem); /* Timers. */ for (i = 0; i < 2; i++) { - s = (m5208_timer_state *)g_malloc0(sizeof(m5208_timer_state)); + s = g_new0(m5208_timer_state, 1); bh = qemu_bh_new(m5208_timer_trigger, s); s->timer = ptimer_init(bh, PTIMER_POLICY_DEFAULT); memory_region_init_io(&s->iomem, NULL, &m5208_timer_ops, s,