From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbZhG-0000Uk-MH for qemu-devel@nongnu.org; Mon, 14 Sep 2015 15:45:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbZhC-0002GG-7U for qemu-devel@nongnu.org; Mon, 14 Sep 2015 15:45:50 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:36555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbZhC-0002FQ-1L for qemu-devel@nongnu.org; Mon, 14 Sep 2015 15:45:46 -0400 Received: by wicgb1 with SMTP id gb1so155993582wic.1 for ; Mon, 14 Sep 2015 12:45:45 -0700 (PDT) Date: Mon, 14 Sep 2015 21:40:09 +0200 From: Jiri Pirko Message-ID: <20150914194008.GD2111@nanopsycho.orion> References: <1442231543-23446-1-git-send-email-armbru@redhat.com> <20150914115736.GA2111@nanopsycho.orion> <55F6EDFC.2070503@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55F6EDFC.2070503@redhat.com> Subject: Re: [Qemu-devel] [PATCH] rocker: Use g_new() & friends where that makes obvious sense List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: sfeldma@gmail.com, Markus Armbruster , qemu-devel@nongnu.org Mon, Sep 14, 2015 at 05:55:40PM CEST, eblake@redhat.com wrote: >On 09/14/2015 05:57 AM, Jiri Pirko wrote: >> Mon, Sep 14, 2015 at 01:52:23PM CEST, armbru@redhat.com wrote: >>> 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). Same Coccinelle semantic patchas in commit b45c03f. >> >> ^ typo :) >> > >This typo is copy-pasted into ALL of your recent g_new() cleanups. Since >you did scattershot threads across multiple maintainers rather than one >big thread, it may be a bit harder to plug all the instances before they >get pulled through the various trees. > >> >> Other than that: >> >> Acked-by: Jiri Pirko > >Reviewed-by: Eric Blake > >[In qemu, we tend to use 'Reviewed-by' for "I've inspected the code and >agree it correctly does what the commit message claims", and the weaker >'Acked-by' for "I agree with the fix as documented in the commit message >but didn't inspect the code to ensure that they match"] Reviewed-by: Jiri Pirko