Received: from eggs.gnu.org ([2001:4830:134:3::10]:52107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRght-00064s-AQ for qemu-devel@nongnu.org; Fri, 05 Feb 2016 08:45:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRghq-0000Lx-1a for qemu-devel@nongnu.org; Fri, 05 Feb 2016 08:45:53 -0500 Received: from roura.ac.upc.edu ([147.83.33.10]:57111 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRghp-0000LD-DZ for qemu-devel@nongnu.org; Fri, 05 Feb 2016 08:45:49 -0500 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <1454522628-28294-1-git-send-email-armbru@redhat.com> <87egct8uy9.fsf@fimbulvetr.bsc.es> <87io25f0ba.fsf@blackfin.pond.sub.org> <87r3gs7hi9.fsf@fimbulvetr.bsc.es> <87fux7d1ls.fsf@blackfin.pond.sub.org> Date: Fri, 05 Feb 2016 14:45:47 +0100 In-Reply-To: <87fux7d1ls.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Fri, 05 Feb 2016 09:04:47 +0100") Message-ID: <87twln1d9w.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/2] error: Documentation updates List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: thuth@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com Markus Armbruster writes: > Llu=C3=ADs Vilanova writes: >> Markus Armbruster writes: >>=20 >>> Llu=C3=ADs Vilanova writes: >>>> Markus Armbruster writes: >>>>=20 >>>>> This overlaps with parts of Llu=C3=ADs's "[RFC][PATCH v6 0/5] utils: >>>>> Improve and document error reporting". Llu=C3=ADs, feel free to inte= grate >>>>> my patches into a respin of your series. You can also respin on top >>>>> of my series. >>>>=20 >>>> Reviewed-by: Llu=C3=ADs Vilanova >>>>=20 >>>> I'm happy with this series as a replacement for mine. Two nitpicks: >>>>=20 >>>> * The error.h comments point to assert() instead of abort() as a repla= cement for >>>> error_setg(&error_abort) (while your HACKING says otherwise). >>=20 >>> Where? >>=20 >> Documentation on error_setg() (last phrase) vs HACKING (also last phrase= ). > Got it. error_setg()'s comment: > Likewise, don't error_setg(&error_abort, ...), use assert(). > This is advice on what to do. > HACKING: > Note that &error_fatal is just another way to exit(1), and > &error_abort is just another way to abort(). > This tries to extend the admonition on exit() and abort() to > &error_fatal and &error_abort. I'm open for better ways to word it. > However, I feel this section of HACKING should not go into detail on > what to do, but leave that to error.h. Right. I just wanted to say the error.h comment should be: Likewise, don't error_setg(&error_abort, ...), use abort(). To be consistent with HACKING (which implies the equivalent for error_abort= is abort()). But that's just me thinking that assert will be omitted when NDEB= UG is defined :) As a side note (just an observation), it seems that NDEBUG is only selectiv= ely (and manually) defined in some files like "tcg/tcg.c", so it's not consiste= ntly affecting files (e.g., it's used as a shorter substitute of "#ifdef CONFIG_DEBUG_TCG", but it's not acting like a "real" NDEBUG; aka assert will still work *iff* it's included before defining NDEBUG, which is not clear at all). >>>> * HACKING does not explicitly point out that exit(1) is the preferred = exit code. >>=20 >>> Does it need saying? We don't seem to have a weird exit() problem in >>> new code. >>=20 >>> The lower HACKING's signal-to-noise ratio gets, the fewer people will >>> actually read it attentively. >>=20 >> Fine by me. > Thanks! Cheers, Lluis