From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a70aj-0004CC-IF for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:45:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a70ae-0003OU-Oi for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:45:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a70ae-0003OQ-J9 for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:44:56 -0500 From: Markus Armbruster References: <1449743372-17169-1-git-send-email-armbru@redhat.com> <1449743372-17169-3-git-send-email-armbru@redhat.com> Date: Thu, 10 Dec 2015 13:44:53 +0100 In-Reply-To: (Peter Maydell's message of "Thu, 10 Dec 2015 10:42:31 +0000") Message-ID: <874mfqfp6i.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 02/12] omap: Don't use hw_error() in device init() methods List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers Peter Maydell writes: > On 10 December 2015 at 10:29, Markus Armbruster wrote: >> Device init() methods aren't supposed to call hw_error(), they should >> report the error and fail cleanly. Do that. >> >> Cc: Peter Maydell >> Signed-off-by: Markus Armbruster > > These are all really "QEMU bug" error paths -- the only place > that uses omap_i2c is the omap SoC init, you can't create the > device on the command line, and so we'll only get these errors > if there's a bug in a function like omap2420_mpu_init. But > I don't object to the patch in principle. All callers use qdev_init_nofail(), so this patch merely converts the hw_error() crash into an &error_abort crash. Improvement, because now it crashes closer to where the bug is. I can spell that out in the commit message if you like. > Reviewed-by: Peter Maydell Thanks!