From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbW6c-00019q-Nt for qemu-devel@nongnu.org; Mon, 14 Sep 2015 11:55:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbW6Z-0007wa-BL for qemu-devel@nongnu.org; Mon, 14 Sep 2015 11:55:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbW6Z-0007wO-39 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 11:55:43 -0400 References: <1442231543-23446-1-git-send-email-armbru@redhat.com> <20150914115736.GA2111@nanopsycho.orion> From: Eric Blake Message-ID: <55F6EDFC.2070503@redhat.com> Date: Mon, 14 Sep 2015 09:55:40 -0600 MIME-Version: 1.0 In-Reply-To: <20150914115736.GA2111@nanopsycho.orion> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mwwB8pj8Je7UKxXSLAr3HCC5CksHuhXRd" 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: Jiri Pirko , Markus Armbruster Cc: sfeldma@gmail.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mwwB8pj8Je7UKxXSLAr3HCC5CksHuhXRd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > ^ typo :) >=20 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. >=20 > Other than that: >=20 > 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"] --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --mwwB8pj8Je7UKxXSLAr3HCC5CksHuhXRd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV9u38AAoJEKeha0olJ0NqepUIALBafQZsi+hji9lP2lnoILmb ba1Kud0Nqc6YCr7IYSBE5dZJ+mSFRg6U64klzI1VLx48yJtF86mLSm1qpvnlk9tX 41EmnZd8wAkibuVJdmbnuqFwQ2jUxvKTb9bUpffacrkHhX0lktJhjO9g8FpmP4AK 9iLIXOQH6YqXa96g5DfXmCHhPL9Z8U8UaU8fXWgINyz9FNUv1hvVJEEBNDuVGdBG Ux9q1cx6SNM+uB/JyC4dKocCQMwtlNCUveK07F/PxR7jFf57DmytCFV1EaCzrA+t w806CQxoHvWXrG6Veg3kNgtRWcjYAhR2PDB879HgadLxQ8OQptXclvIhdypWj4g= =spqe -----END PGP SIGNATURE----- --mwwB8pj8Je7UKxXSLAr3HCC5CksHuhXRd--