From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLy2O-0006cG-Cy for qemu-devel@nongnu.org; Wed, 20 Jan 2016 14:03:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLy2K-0001Qo-CW for qemu-devel@nongnu.org; Wed, 20 Jan 2016 14:03:24 -0500 From: Markus Armbruster References: <1453219845-30939-1-git-send-email-eblake@redhat.com> <1453219845-30939-19-git-send-email-eblake@redhat.com> Date: Wed, 20 Jan 2016 20:03:17 +0100 In-Reply-To: <1453219845-30939-19-git-send-email-eblake@redhat.com> (Eric Blake's message of "Tue, 19 Jan 2016 09:10:26 -0700") Message-ID: <87mvs0kr9m.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v9 18/37] qapi: Drop unused error argument for list and implicit struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Michael Roth , Alexander Graf , qemu-devel@nongnu.org, "open list:sPAPR" , marcandre.lureau@redhat.com, David Gibson Eric Blake writes: > No backend was setting an error when ending the visit of a list > or implicit struct. That's a lie: qmp_input_end_list() does. But it shouldn't, as you explain below. Rephrase the commit message? > Make the callers a bit easier to follow by > making this a part of the contract, and removing the errp > argument - callers can then unconditionally end an object as > part of cleanup without having to think about whether a second > error is dominated by a first, because there is no second error. > > The only addition of &error_abort in this patch, in the function > qmp_input_end_list(), will never trigger unless a programming > bug creates a push(struct)/pop(list) or push(list)/pop(struct) > mismatch. > > A later patch will then tackle the larger task of splitting > visit_end_struct(), which can indeed set an error (and that > cleanup will also have the side-effect of removing the use of > error_abort added here). > > Signed-off-by: Eric Blake > Reviewed-by: Marc-Andr=C3=A9 Lureau Patch looks good. I like the simplification.