From patchwork Mon Feb 27 14:01:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 657087 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2382857wrb; Mon, 27 Feb 2023 06:31:42 -0800 (PST) X-Google-Smtp-Source: AK7set8LHWpbSjvJMS2fMsmM7XleLo6BbOv7fHp8BBP54etQ0Bss/GJejGelBBC/Yvde4nrA04Tn X-Received: by 2002:ac8:5dc9:0:b0:3bf:bb09:28ca with SMTP id e9-20020ac85dc9000000b003bfbb0928camr18730469qtx.18.1677508302061; Mon, 27 Feb 2023 06:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508302; cv=none; d=google.com; s=arc-20160816; b=F6V5PHJthG0gFb1j+i/n80c19jbiXZMs5yLsLEC79x0GmytRkTzLJBbVjWmguiUKTM huFUr/S6Rg9QbvKDXS7Jln4V1UagX+g0zsyLEIAatrhYGOJCPqWXcahnvscKxYqq227r lf85lHYh1EhSIGYY3xDtUBe74kcfh9bM6nTy1YGKZ0v5PNxzgPTx65tgQ/3Obpa06oCv DtmqKNn17ijFndVKygOrWx4XrykCMivuQMOMVVdA29iV4vCSN1PrvmrwYIsefckTx4bE RFdIqvXDNCrtswPLfr9y3grBPqdO3J4iNuvBz0vojZmIBg1EeRsH8gJeuKTMx8VQKD8J Emhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PZo3682M7EwepHbREv9enem8cosk7pXWG1PM7HlrsYo=; b=reXWZkx2jDCFJ3eRKN2CMJo6vTHTNL1vXgeGPOOcZ36ZQy5SUHBRyJ8RIK12oSge6X IxO23VwPNjo5H3/W2wmk+j/ZdFT9HbmtljP63o9K6sOZFeCeyVN6V5HitYNjyR4Co00E 8+3gj8Ej3FNIHby9ZwUFlOaIJz0qMD8UOq1ooARX/in+JHDWdCl6S+bdv6QXLU4kver+ fmoWbCdaUhURZ3Riy4nY0TvXk9yMS4wYRC0lBrM2O7fs3NXt41fr0GSLv06OrDKum99e //tF+emV13CFlTh3pI/DVE6f1B1hJC3hRuxU2NvC7BPE8P1DaBMAwMN43VVbQwZp/Igb +ePQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ks4WknWP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id br40-20020a05620a462800b007426f039479si6385750qkb.294.2023.02.27.06.31.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:31:42 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ks4WknWP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWe9Z-0007Td-PF; Mon, 27 Feb 2023 09:06:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWe9X-0007Jr-EJ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:55 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe9V-0000Dd-E4 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:54 -0500 Received: by mail-wr1-x434.google.com with SMTP id t15so6351833wrz.7 for ; Mon, 27 Feb 2023 06:06:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PZo3682M7EwepHbREv9enem8cosk7pXWG1PM7HlrsYo=; b=Ks4WknWPZGe2FdFhXgH3OoocOs56ovZjVwELGPfF71QChumsyGUo/WA0xGlLvC8zP3 xI1Lu3/fXYNSiBa/LaJAw8rgB9xwJ2Qc0N9fIqvPjMx3EArKWMEv0IpPOy9/JzWJwqqx 60UCAz96Ac4t3Ab5qstqq4mydKgoYwZhMgOCuK1R/3AqnQSLUIOpakNP9DQBOCxmXgo9 WdwLoDwixUWrXGtCWNXFTNlj/V65Pq0zlFG7TzZsixXGH7rxF4AxX0FvmQpNXGD/vqPr y62QeEKU/clAvdnxjkAmT2QWH54sdfRCmH92vdl5avneiwvkYXyVKJ8ndE2hQqgZ8MOY RHeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PZo3682M7EwepHbREv9enem8cosk7pXWG1PM7HlrsYo=; b=KoKTDj40jh/b3HkwMj1lrohofOZDNi/tsF+ligbDHy37CrQKPOPX0STm8MpuvjqLxZ 9XAdxRDef7ZoQasVotRmdaHdECGJv/QOk5qmw/DFgsDgz8TxCCUtyw2oOqEn2Vl7j7Qs RG5pEI9Jw5y7fxjvMIHOi1tsn2iISXlS+cUA/DZe0HxwTSxj8YyyDONC0F6eLMDPduKv M5DsOKvo60Ooqo/SfGyhd7whzWz5osG01D6I2GAoCXffDqcn89k0gZU3O6uvokzCvlOK uCO58hyTJTKq85bJWZTfQpie2xYYXzbLhfzKLYIcio8BBPpGKUjRJHrbv2UTwnSlxw95 bGgg== X-Gm-Message-State: AO0yUKVSue9X0P0h2wEsDOQ2+2ksqHxaN93qHQV5ZY2yxhVQWN4kGgmY YCwfTVtixDMC4SUTv6ayROPZ0KwhGFcc8tfW X-Received: by 2002:a05:6000:1005:b0:2c9:97f8:2604 with SMTP id a5-20020a056000100500b002c997f82604mr5485344wrx.14.1677506809901; Mon, 27 Feb 2023 06:06:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m9-20020a05600c4f4900b003dec22de1b1sm9988365wmq.10.2023.02.27.06.06.49 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 060/126] hw/isa: Un-inline isa_bus_from_device() Date: Mon, 27 Feb 2023 15:01:07 +0100 Message-Id: <20230227140213.35084-51-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org No point in inlining isa_bus_from_device() which is only used at device realization time. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230210163744.32182-9-philmd@linaro.org> Reviewed-by: Bernhard Beschow --- hw/isa/isa-bus.c | 5 +++++ include/hw/isa/isa.h | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 845686cb12..2464357971 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -164,6 +164,11 @@ bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp) return qdev_realize_and_unref(&dev->parent_obj, &bus->parent_obj, errp); } +ISABus *isa_bus_from_device(ISADevice *dev) +{ + return ISA_BUS(qdev_get_parent_bus(DEVICE(dev))); +} + ISADevice *isa_vga_init(ISABus *bus) { vga_interface_created = true; diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 34fa8977e9..1d3ffec4de 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -83,6 +83,7 @@ qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq); void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq); MemoryRegion *isa_address_space(ISADevice *dev); MemoryRegion *isa_address_space_io(ISADevice *dev); +ISABus *isa_bus_from_device(ISADevice *dev); /** * isa_register_ioport: Install an I/O port region on the ISA bus. @@ -120,9 +121,4 @@ int isa_register_portio_list(ISADevice *dev, const MemoryRegionPortio *portio, void *opaque, const char *name); -static inline ISABus *isa_bus_from_device(ISADevice *d) -{ - return ISA_BUS(qdev_get_parent_bus(DEVICE(d))); -} - #endif