From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfWGw-0008IH-0a for qemu-devel@nongnu.org; Fri, 25 Sep 2015 12:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfWGt-00008j-1h for qemu-devel@nongnu.org; Fri, 25 Sep 2015 12:54:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfWGs-00008a-RS for qemu-devel@nongnu.org; Fri, 25 Sep 2015 12:54:54 -0400 From: Markus Armbruster References: <1442872682-6523-1-git-send-email-eblake@redhat.com> <1442872682-6523-10-git-send-email-eblake@redhat.com> Date: Fri, 25 Sep 2015 18:54:52 +0200 In-Reply-To: <1442872682-6523-10-git-send-email-eblake@redhat.com> (Eric Blake's message of "Mon, 21 Sep 2015 15:57:25 -0600") Message-ID: <87h9misalf.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v5 09/46] qapi: Use consistent generated code patterns List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: marcandre.lureau@redhat.com, DirtY.iCE.hu@gmail.com, qemu-devel@nongnu.org, ehabkost@redhat.com, Michael Roth Eric Blake writes: > We had some pointless differences in the generated code for visit, > command marshalling, and events; unifying them makes it easier for > future patches to consolidate to common helper functions. > - Consistently name the error variable 'err' Before the patch, qapi-event.py consistently uses local_err, and qapi-commands.py uses both names. I like your change. > - Consistently use the labels 'out' and 'out_obj' Before, qapi-event.py consistently uses 'clean', and qapi-visit.py uses both 'out_obj' and 'out_end'. Good change. > - If allocation fails, jump to the right label rather than > indenting everything else Good idea. Just one instance, in gen_visit_union(). Not mentioned: name the Visitor * parameter 'v' instead of 'm'. No idea where that 'm' comes from, but it has spilled over into qom/object.c and qom/qom-object.c. Let's ignore that for now. > No change in semantics to the generated code. Yes, but you need to update docs/qapi-code-gen.txt. Pretty mechanical changes. They look good to me, but as always, this kind is easier to review when you do exactly one mechanical change per patch.