From patchwork Fri Feb 10 16:37:41 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: 652343 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp1059659wrr; Fri, 10 Feb 2023 08:39:10 -0800 (PST) X-Google-Smtp-Source: AK7set/7fi+0q1zJRtINNNQcZ4k60p3JYLp2CYL5pnNj1CrsEXki6S4EKIDeo6+GKYzQGrNYZPMV X-Received: by 2002:a05:6214:260a:b0:56a:7a8d:37fe with SMTP id gu10-20020a056214260a00b0056a7a8d37femr27977711qvb.43.1676047149886; Fri, 10 Feb 2023 08:39:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676047149; cv=none; d=google.com; s=arc-20160816; b=qN6A39PSNHKwp2oNs25eeFkgD2jp6+qYlUGERSTeNiKpKIasEkkLDh2LgVu6miWV4C q5iJ8N/ocElwnTj+UNl9YYLWIKqxweOXVB8sLxifJYZU/QSbGmBKakxIT/B7aXs1fEJd 8Qw5yHPVIUlNnxy/rhsTU1ptIy1GNmcwAy4iWyp2SUffI2xA/8acArYYWmkyq9mENPPT 0Gbz5SzfXLOdg0hKDMco+OhoCorWT7mt/PCldlaDGXIFY7jbx0zPctzxFlPyQgYQurDe bs9tVnJ5T+yRY05TLSH2i/Jf7hSMa+ADFlDi+Li3yPQKVrVhixmt9O8/jjNQ+i9rWqLa m9mA== 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:cc:to :from:dkim-signature; bh=IWcvQknD/lsP28cONSk1Clq7qvez3jPkPtVzdhOOOJk=; b=A0epC95BnsciOGnyeSJ8B7cUrNRlVBD/6yH2N+vJxaiY3uXs/POau8YY+T7Gwto2gZ R/rIgV3jjShXvxdE/6Wuox20HY0Bv4yrtxEysXPzyC4yvDLBVqdCqc/huMNHCV4rwIQl u2u5gR9pjy39UoXTVR2JfinK1RvW8WHrVLu4nq3hHWrw3mkckNqrRTj33eyk7pI/NJYt iB5fR+hlUpDTaF6pnpIzVvWsobknBgzdctYJE8HHGCJncXEHJ6opUykIeQfQ90+d1YjR zlxadODmz6UZZpBMIOPCvPk9f/FxM6nVBZ0zy/fINhlfm07qH+/CD2SL3OWR79niiSgU Krlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vGwwtV6D; 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 t128-20020a37aa86000000b00706ab10e026si4109527qke.229.2023.02.10.08.39.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Feb 2023 08:39:09 -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=vGwwtV6D; 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 1pQWQ7-0001b7-AU; Fri, 10 Feb 2023 11:38:43 -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 1pQWPu-0001NY-BP for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:34 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQWPr-0000Ht-Um for qemu-devel@nongnu.org; Fri, 10 Feb 2023 11:38:29 -0500 Received: by mail-wm1-x331.google.com with SMTP id hn2-20020a05600ca38200b003dc5cb96d46so6677017wmb.4 for ; Fri, 10 Feb 2023 08:38:27 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IWcvQknD/lsP28cONSk1Clq7qvez3jPkPtVzdhOOOJk=; b=vGwwtV6DzmFLbxsdZpxIprsKJuG70CrTDeMlBGFU0q7ib+Z32rZwKKLfWj2eJIwqYv DW44mgYTi28C37FsseZ/uo+GL28c0uQ+qDk0xqxEAvE6B7wMRVRoVUBcnCL0+LgNIPvi 5sZMpunm+yyRerIwLWSBUETFwtctiPF1hFue0mKM06zHTcdM+OyPbTakgGosG8VhiNm1 ZPDTKzduKqyodQdVR7lo3fSEs/SKqzfeOTGiXxRB8fMKGuqsDntUAdQLQErtqD+xR5WD h585u8zU8OxGZK70D3KWQV9Fr4yitJadRSwY8A0knR1mU58XYo0tTnvfJ5wJ0lQjlcoB 5CPw== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IWcvQknD/lsP28cONSk1Clq7qvez3jPkPtVzdhOOOJk=; b=nnyXmcKeZdcqFrDNymZnEnGMVgQ22Apc1h4fV7BmEbf2z3XxkO/xevwRafSiHiC5Zb 6AWZYAaAWTMerrNjZ/2Fc/abbMxkWhJCqxuVCVinplDIRtDcTVxoEWB9/LARuwrz0r0N qV06lsC9R1cTkUfIXUcXTNqgn+LqxiTgglhkAxEsA2EpSR3VfnD4yQ4Bq3r8l39FLFVv JROsWcxeEhbDiJw4iHH/ng7IoUE8sGrSJ5EF8fNyf98n9VFxK2l34zyoV35EawEE5GPE GK+CH9x15sAzKOLnRTgD94wMOSlbCw0/GyUUMEhWJiuOsR82b7ieKgGtH7SK11i/7wzR XWBA== X-Gm-Message-State: AO0yUKVWxACSmAV69oBd+IL5c37OrSK+eh2wSFcLLB6ILgKz/DzADC1D IQx6P1lK9f4ETWI2jSugi1MiYmmzre6YNO7u X-Received: by 2002:a05:600c:a295:b0:3dc:40a0:3853 with SMTP id hu21-20020a05600ca29500b003dc40a03853mr2540528wmb.11.1676047106331; Fri, 10 Feb 2023 08:38:26 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z6-20020a1c4c06000000b003d1d5a83b2esm8273180wmf.35.2023.02.10.08.38.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 08:38:26 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Sergio Lopez , Richard Henderson , qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 08/11] hw/isa: Un-inline isa_bus_from_device() Date: Fri, 10 Feb 2023 17:37:41 +0100 Message-Id: <20230210163744.32182-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230210163744.32182-1-philmd@linaro.org> References: <20230210163744.32182-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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=unavailable 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é --- 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 4fe61d6dfe..5bd99379e9 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -162,6 +162,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 e81cd33e3c..1691364011 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -87,6 +87,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. @@ -124,9 +125,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