From nobody Mon Feb 9 19:52:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621374984; cv=none; d=zohomail.com; s=zohoarc; b=Nayzj4jWPYpsNQdXkxpCKPVzPHxubNVYzzHJAe6FjxB5BwO4332HONpiN/QVMSIhVtuEv2mcHgdGVtE16hZMEp0uKY8Y+HqweSnHQcPyHjzOPJpk8IXNm1VN9NxuAGM0f88m1n0Brf/Y8nTsi0TnvtuazT0Xdk2noMb/pgs/u7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621374984; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=ikpWd2OyM2n7rA9VZke1YbE+cyYsUCfVNrvrzcxe5R8=; b=LSs242ORDhcbR8Xrin9ddQiIr5UpoOSdzoSSLQ3329gLftAwvsdRSJxq4KpNKk2l5gXco5oUK5+nmAoiNMOfzlYmdk21ZKY0ZRa6EdGinLWBjPpw/N86kIFM+POTdQ0d/fWiqHDQ7RlMAGrQWYc2FDfuJxdpDtDkYtsoMUYLr9E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1621374984848689.487861826059; Tue, 18 May 2021 14:56:24 -0700 (PDT) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-414--0XlAqEhMriJxSRggOyZig-1; Tue, 18 May 2021 17:56:22 -0400 Received: by mail-ej1-f69.google.com with SMTP id w13-20020a170906384db02903d9ad6b26d8so1066374ejc.0 for ; Tue, 18 May 2021 14:56:22 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id p9sm13752152edu.79.2021.05.18.14.56.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 14:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621374983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ikpWd2OyM2n7rA9VZke1YbE+cyYsUCfVNrvrzcxe5R8=; b=FX3/lCxx4E/tREyhY9hAaoi/OqH6BPyaqIsURUT9qW98o0v3n09sYfCzyVa6sv7vj8ZWxZ 46ZOB+RKXpLzP4zGD6PH+tsD0Z3op0b33vbybJ/S4cMpgyHilynRani8JsYsQRyTy8Bgqg 65OlalSIDECvcm6DOjK5srVwbcB3iy4= X-MC-Unique: -0XlAqEhMriJxSRggOyZig-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ikpWd2OyM2n7rA9VZke1YbE+cyYsUCfVNrvrzcxe5R8=; b=OSGlKsv//E6U5PhlQizrudRdE5iAolRwIiQSVmDzTiTomhsms4NEeTe7lKNDixhT6d U9TgpQMD8PbIqTm9nheQN5araKfsg/pLHriG/3FYWro07l6QUsnvFPefX3UzYgSAx3aQ S27Su6HrrmWEc0H4DiL03nh5Xx3l5g76OxOf5vJjTo/EcATPQwaNaNngMfxviiNFeik7 7SwLCzprCfoaY9tp3h46BNmxICdVFXjMXEh2P2URlajriNnUDLkN/hB5rsKF84qxDXF9 zfG2pcvp/6uBoj+yVQE2m4qyALCF9PwofejnNpijap3z/1dcgUVgnJoGg/DjP2qNYwA5 OKng== X-Gm-Message-State: AOAM533O4N7kvBm2zEAgFOkt+n6U0RXwWutQxYdandVchGr5ZDjsnLnt psQxOfqHt3Stzf9HFxmyP4QBMYcDHp8lIF4gqOpQqPPCBPqNDERC9tUKV05l0/rCqT2bRhoD+4L tALOAtnFxBzb49Q== X-Received: by 2002:a50:ff08:: with SMTP id a8mr9299085edu.46.1621374981074; Tue, 18 May 2021 14:56:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9z0vfSzJXYPjIgl8PVjjfHMdAt8ZAsx52ZHlLHu0c47c7R7aZomL11YipaDMH4K8432Wyrw== X-Received: by 2002:a50:ff08:: with SMTP id a8mr9299076edu.46.1621374980899; Tue, 18 May 2021 14:56:20 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: John Snow , qemu-devel@nongnu.org Cc: Elena Ufimtseva , Markus Armbruster , Mark Cave-Ayland , Stefan Hajnoczi , Jagannathan Raman , Thomas Huth , John G Johnson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 07/11] hw/isa: Simplify isa_get_irq() Date: Tue, 18 May 2021 23:55:41 +0200 Message-Id: <20210518215545.1793947-8-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210518215545.1793947-1-philmd@redhat.com> References: <20210518215545.1793947-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Previous commit removed the calls to isa_get_irq() passing a NULL ISADevice. Simplify the assertion, removing the use on the global isabus object. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/isa-bus.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index b946e6dc478..65a26ac6c2c 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -89,7 +89,11 @@ qemu_irq isa_bus_get_irq(ISABus *bus, unsigned isairq) */ qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq) { - assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) =3D=3D isabus= ); + ISABus *isabus; + + assert(dev); + isabus =3D isa_bus_from_device(dev); + return isa_bus_get_irq(isabus, isairq); } =20 --=20 2.26.3