From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnpZ8-0001Iq-Ed for qemu-devel@nongnu.org; Tue, 03 Dec 2013 07:59:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnpZ1-0004qQ-Cu for qemu-devel@nongnu.org; Tue, 03 Dec 2013 07:59:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnpZ1-0004qM-3A for qemu-devel@nongnu.org; Tue, 03 Dec 2013 07:58:55 -0500 Message-ID: <529DD58C.8020408@redhat.com> Date: Tue, 03 Dec 2013 05:58:52 -0700 From: Eric Blake MIME-Version: 1.0 References: <87a9ginu92.fsf@blackfin.pond.sub.org> In-Reply-To: <87a9ginu92.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ghElG5d8KeBOEjlCDWrXsE9WnVgNRnhTG" Subject: Re: [Qemu-devel] [RFC PATCH v1 0/5] Add error_abort and associated cleanups List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Peter Crosthwaite Cc: imammedo@redhat.com, qemu-devel@nongnu.org, afaerber@suse.de, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ghElG5d8KeBOEjlCDWrXsE9WnVgNRnhTG Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/03/2013 02:44 AM, Markus Armbruster wrote: > Peter Crosthwaite writes: >=20 >> Following our discussion RE self asserting API calls, here is a spin o= f >> my proposal. This series obsoletes the need for _nofail variants for >> Error ** accepting APIs. Is also greately reduces the verbosity of cal= ls >> sites that are currently asserting against errors. >> >> Patch 1 is the main event - addition of error_abort. The following >> patches then cleanup uses of _nofail and assert_no_error(). >> >> To give it a smoke test, I introduce a (critical) bug into QOM: > [...] >> 32 files changed, 100 insertions(+), 143 deletions(-) >=20 > I like it. Nice diffstat, too. >=20 > There are some _nofail functions left, but none of them can use > error_abort. >=20 Also, is it worth adding asserts and/or compiler annotations to require that the Error **err argument of functions be non-NULL, to ensure that callers are always passing either a valid destination or one of the special addresses? But doing so would probably require adding a special address for error_ignore for callers that intend to discard an error in cases where the return type of the function lets them know to proceed with a fallback implementation (that is, cases where ignoring an error makes sense). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ghElG5d8KeBOEjlCDWrXsE9WnVgNRnhTG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSndWMAAoJEKeha0olJ0NqeBIH/itFIyW2j2kX6PQCXuKMms1A drYv/MOwRSunorX8utdxXgUfB4f9SUmYjr+GzWuU9quOOqwEgax5YA+OqJCCk5rX AhqMQc5uZyeH8oNMxUqiFQFDFdExvW26MXU+qcBJltAAxUgPthDef0pIUviN+xMW 839A8cdLhZMQRsVGvXHSqImANs9csIZaCXM7t7lOC6KGMt6VbeDED1KmAAYVDs4X 0IJHwuzwsWs8b2DcR4bbMHezoGUnwDoz//hqat6AyfxU9LKi2Oc6AIwRaU9sJWh8 yLeN58N/rPJ6n//vjF1cjewwRr8LJ20GKFwtFhe+NBInPbtDftD7jxe7UpQEJHw= =I880 -----END PGP SIGNATURE----- --ghElG5d8KeBOEjlCDWrXsE9WnVgNRnhTG--