From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9YmP-0005bu-IC for qemu-devel@nongnu.org; Thu, 17 Dec 2015 08:39:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9YmM-0000Ll-Bv for qemu-devel@nongnu.org; Thu, 17 Dec 2015 08:39:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9YmM-0000Lg-66 for qemu-devel@nongnu.org; Thu, 17 Dec 2015 08:39:34 -0500 Date: Thu, 17 Dec 2015 15:39:28 +0200 From: "Michael S. Tsirkin" Message-ID: <20151217153756-mutt-send-email-mst@redhat.com> References: <1450354795-31608-1-git-send-email-armbru@redhat.com> <1450354795-31608-12-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1450354795-31608-12-git-send-email-armbru@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 11/13] isa: Clean up inappropriate hw_error() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Markus Armbruster , Mark Cave-Ayland , qemu-devel@nongnu.org, =?iso-8859-1?Q?Herv=E9?= Poussineau , Aurelien Jarno , Richard Henderson On Thu, Dec 17, 2015 at 01:19:53PM +0100, Markus Armbruster wrote: > 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. >=20 > Since the previous commit, passing a null bus is a programming error. > Drop the hw_error() and simply let it crash. >=20 > Cc: Richard Henderson > Cc: "Michael S. Tsirkin" > Cc: "Herv=E9 Poussineau" > Cc: Aurelien Jarno > Cc: Mark Cave-Ayland > Signed-off-by: Markus Armbruster > Reviewed-by: Herv=E9 Poussineau I'd prefer an assert just in case. > --- > hw/isa/isa-bus.c | 11 ----------- > 1 file changed, 11 deletions(-) >=20 > 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* a= ddress_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 *nam= e) > { > DeviceState *dev; > =20 > - if (!bus) { > - hw_error("Tried to create isa device %s with no isa bus presen= t.", > - name); > - } > dev =3D qdev_create(BUS(bus), name); > return ISA_DEVICE(dev); > } > @@ -149,10 +142,6 @@ ISADevice *isa_try_create(ISABus *bus, const char = *name) > { > DeviceState *dev; > =20 > - if (!bus) { > - hw_error("Tried to create isa device %s with no isa bus presen= t.", > - name); > - } > dev =3D qdev_try_create(BUS(bus), name); > return ISA_DEVICE(dev); > } > --=20 > 2.4.3