From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6yTl-0007lc-6y for qemu-devel@nongnu.org; Thu, 10 Dec 2015 05:29:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6yTj-0007OJ-7a for qemu-devel@nongnu.org; Thu, 10 Dec 2015 05:29:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6yTj-0007Nn-3N for qemu-devel@nongnu.org; Thu, 10 Dec 2015 05:29:39 -0500 From: Markus Armbruster Date: Thu, 10 Dec 2015 11:29:30 +0100 Message-Id: <1449743372-17169-11-git-send-email-armbru@redhat.com> In-Reply-To: <1449743372-17169-1-git-send-email-armbru@redhat.com> References: <1449743372-17169-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 10/12] isa: Clean up inappropriate hw_error() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , "Michael S. Tsirkin" , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , Richard Henderson isa_bus_irqs(), isa_create() and isa_try_create() call hw_error() when passed a null bus. Use of hw_error() has always been questionable, because these are used only during machine initialization, and printing CPU registers isn't useful there. Since the previous commit, passing a null bus is a programming error. Drop the hw_error() and simply let it crash. Cc: Richard Henderson Cc: "Michael S. Tsirkin" Cc: "Herv=C3=A9 Poussineau" Cc: Aurelien Jarno Cc: Mark Cave-Ayland Signed-off-by: Markus Armbruster --- hw/isa/isa-bus.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index af6ffd6..630054c 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -63,9 +63,6 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion* add= ress_space, =20 void isa_bus_irqs(ISABus *bus, qemu_irq *irqs) { - if (!bus) { - hw_error("Can't set isa irqs with no isa bus present."); - } bus->irqs =3D irqs; } =20 @@ -137,10 +134,6 @@ ISADevice *isa_create(ISABus *bus, const char *name) { DeviceState *dev; =20 - if (!bus) { - hw_error("Tried to create isa device %s with no isa bus present.= ", - name); - } dev =3D qdev_create(BUS(bus), name); return ISA_DEVICE(dev); } @@ -149,10 +142,6 @@ ISADevice *isa_try_create(ISABus *bus, const char *n= ame) { DeviceState *dev; =20 - if (!bus) { - hw_error("Tried to create isa device %s with no isa bus present.= ", - name); - } dev =3D qdev_try_create(BUS(bus), name); return ISA_DEVICE(dev); } --=20 2.4.3