Received: from eggs.gnu.org ([2001:4830:134:3::10]:55373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNgWo-0003ba-Eo for qemu-devel@nongnu.org; Tue, 29 May 2018 11:27:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNgWn-0001wl-EY for qemu-devel@nongnu.org; Tue, 29 May 2018 11:27:14 -0400 References: <20170724182751.18261-1-f4bug@amsat.org> <20170724182751.18261-22-f4bug@amsat.org> <713f16f9-3faa-7644-38c6-0797252d5922@amsat.org> From: Eric Blake Message-ID: <63a61375-ef2e-970c-7f43-6cfe1d7666b1@redhat.com> Date: Tue, 29 May 2018 10:27:03 -0500 MIME-Version: 1.0 In-Reply-To: <713f16f9-3faa-7644-38c6-0797252d5922@amsat.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for 2.10 21/35] arm/sysbus-fdt: fix null pointer dereference List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Cc: Peter Maydell , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , qemu-arm , QEMU Developers , Markus Armbruster [adding Markus, as the error maintainer] On 05/29/2018 09:33 AM, Philippe Mathieu-Daud=C3=A9 wrote: >>>> Ok I see, Clang is unaware than error_setg(&error_fatal) is a noretu= rn. >>> >>> Indeed, and that's because error_setg(&error_fatal) is not in preferr= ed >>> form. >>> >>>> >>>> Patch dropped. >>> >>> That's a shame. Rather, we should patch this file (and others) to av= oid >>> all the inconsistent uses of error_setg(&error_*), to comply with the >>> error.h documentation. >=20 > I started to port/clean this up. > To avoid future inconsistencies, do you think we should/can enforce thi= s > check in checkpatch (which is stricter than human review)? Sure, automating good code style is worthwhile. > Is the "Qemu error function tests" section a good place to put this che= ck? Probably works. I'm not familiar enough with checkpatch as a whole to=20 have any different suggestions off the top of my head (basically, any=20 time I've touched that file, it's been grepping for something that is=20 similar to what I want to be tweaking, rather than reading the whole thin= g). --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org