From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCavr-00031b-Of for qemu-devel@nongnu.org; Mon, 13 Jun 2016 19:06:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCavn-0002OJ-Hy for qemu-devel@nongnu.org; Mon, 13 Jun 2016 19:06:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCavn-0002OB-C1 for qemu-devel@nongnu.org; Mon, 13 Jun 2016 19:06:07 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 79F7685A02 for ; Mon, 13 Jun 2016 23:06:06 +0000 (UTC) References: <1465855078-19435-1-git-send-email-ehabkost@redhat.com> <1465855078-19435-3-git-send-email-ehabkost@redhat.com> From: Eric Blake Message-ID: <575F3C5D.2070000@redhat.com> Date: Mon, 13 Jun 2016 17:06:05 -0600 MIME-Version: 1.0 In-Reply-To: <1465855078-19435-3-git-send-email-ehabkost@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ES0fx7J6vST6ktSbk8aHDH1cqQoH7J4cC" Subject: Re: [Qemu-devel] [PATCH v3 2/3] error: Remove unnecessary local_err variables List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , Markus Armbruster , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ES0fx7J6vST6ktSbk8aHDH1cqQoH7J4cC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/13/2016 03:57 PM, Eduardo Habkost wrote: > This patch simplifies code that uses a local_err variable just to > immediately use it for an error_propagate() call. >=20 > Coccinelle patch used to perform the changes added to > scripts/coccinelle/remove_local_err.cocci. >=20 > Reviewed-by: Eric Blake > Acked-by: Cornelia Huck > Signed-off-by: Eduardo Habkost > --- > Changes v1 -> v2: > * (new patch) >=20 > Changes v2 -> v3: > * Remove unused metavariable from script > * Do changes only if errp is not touched before the error_setg() > call (so we are sure *errp is not set and error_setg() won't > abort) > * Changes dropped from v2 due to script changes: > * block.c:bdrv_create_co_entry() This one still qualifies as a single use of errp, it's just that script is now too strict to see it. Can be cleaned up in a followup, to keep this patch as strict Coccinelle changes. > * block.c:bdrv_create_file() Correct to drop this one. > * blockdev.c:qmp_blockdev_mirror() Correct to drop this one (bdrv_lookup_bs() should never set errp when returning non-NULL, but Coccinelle can't see that). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ES0fx7J6vST6ktSbk8aHDH1cqQoH7J4cC 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/ iQEcBAEBCAAGBQJXXzxdAAoJEKeha0olJ0NqLU4H/1glb/DQIuOG1eQoPfnBarfP VqjrMXh1mWy5ji8ljZOBvpHREo+mGUl02HC8HYHwB6rUC5Z1yIsMgQDycV34N4rq A6O88dueH80Hl0ccKbZxxfh2070ujNawatiHFKmcXzN4a/mqLTMVMI43HnrQ4u5H HRr8pDE376L7MY7Q2Z3MNEuqvyH8CKL6nAGep6oiiWaXSdeRiIZpXilU5U3Bvwb3 dxdDmxNnXdBc3+RKIyjLDcJIdt0HCZSBnBCPvwPQfq2tHb6+W7KJayKf6apaAYxF 68BDxR9MjUlEXiVJppxIuLsy/ChyNtrtlKqiNgfMG6XIVC2R7aAb1d4iVQ4rals= =e7ap -----END PGP SIGNATURE----- --ES0fx7J6vST6ktSbk8aHDH1cqQoH7J4cC--