From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9Zd6-0002Bd-8T for qemu-devel@nongnu.org; Thu, 17 Dec 2015 09:34:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9Zcz-0005ix-HH for qemu-devel@nongnu.org; Thu, 17 Dec 2015 09:34:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9Zcz-0005it-Bf for qemu-devel@nongnu.org; Thu, 17 Dec 2015 09:33:57 -0500 References: <1450354795-31608-1-git-send-email-armbru@redhat.com> <1450354795-31608-9-git-send-email-armbru@redhat.com> From: Thomas Huth Message-ID: <5672C7D2.40205@redhat.com> Date: Thu, 17 Dec 2015 15:33:54 +0100 MIME-Version: 1.0 In-Reply-To: <1450354795-31608-9-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 08/13] sysbus: Don't use hw_error() in machine_init_done_notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: Alexander Graf On 17/12/15 13:19, Markus Armbruster wrote: > platform_bus_map_irq() and platform_bus_map_mmio() use hw_error() to > fail. They run in machine_init_done_notifiers, via > platform_bus_init_notify() and link_sysbus_device(). Printing CPU > registers is not helpful there. > > Replace hw_error() by error_report(); exit(1). If these are > programming errors, it should be replaced by an assertion instead. > > While there, observe that both functions always return 0, and > link_sysbus_device() ignores the return value. Change them to void. > > Cc: Alexander Graf > Signed-off-by: Markus Armbruster > --- > hw/core/platform-bus.c | 25 ++++++++++++------------- > 1 file changed, 12 insertions(+), 13 deletions(-) Reviewed-by: Thomas Huth