From patchwork Wed Feb 15 16:16:40 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: 653722 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp432120wrr; Wed, 15 Feb 2023 08:20:00 -0800 (PST) X-Google-Smtp-Source: AK7set+1bfT0iLk0zBNdF0rpfMw1MVz7wHoxqajMAyHf0Hek45KatAoII4+JBodo+tv192EJoZTr X-Received: by 2002:a05:622a:5ce:b0:3bc:e507:297 with SMTP id d14-20020a05622a05ce00b003bce5070297mr6011877qtb.21.1676478000025; Wed, 15 Feb 2023 08:20:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676478000; cv=none; d=google.com; s=arc-20160816; b=gP7FhXTLVA++O6J967IXPDMOetCfGV3aWTehSNWds6gseSjmyGyaJzSD2hZzkAZ+xm zYpw8MmYR0W3U2E2PgP78bZB5+G17pEMlRkGds63vvLOj3FRa9bF1/iWjeAfiaFeGyuh iiH3/gENknZBxtqWlhuY7WGgl70Ca9vi6KpaQE5IoQ0YtoZJ1mSWHNnlGEWFcvSk5CV3 HXirehP5VfkGjEhKiZsZKUINPF7H5MvDgYnYVux//953hsfcEqIRbWqxn7eCC+S0QkOR 1LAshq04ScKKrJwOzIvtiDwR/cKzOlH+oJvm4TWJYME+87zw2mmBB72ndcgspP4McEc5 ARWA== 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=byjwIFfgSe6JHFt0da/kKLLZa+4oG9V3qoed2WoaFQk=; b=cJUHnw8WzAh75SbdRoT+4rFmCIuuq++QFAgUrAkXd0Ab5anMYLghZI+1+13TmXMatS 5ttZ5mPuZfiaQkKjFQdDF1/d9+6NV6d6t0RstLj5BkEC/WzJ3MSKCbzQ/s4W3HJ0AQgL kqw37Z3Q80wd1n6or36ObDw7NZnk16othev4EkpsyrmOVRFdWa4cPzxr0IFvQj8BqNBt qZb92QCD+2yft4L7bzg2Oaa4dN96/FqQfkIbX1guHHVUv8BoTSAlG6E/nQbpZdRCqTnx G/Rve38o8A8XLahqikWTllrNBLwmxIYlBd8HbhfZtbwPkOpjQV4NT/qZihPhSII69mDJ 3qZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fx2gl8li; 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 5-20020ac856e5000000b003ba356296aesi12672167qtu.665.2023.02.15.08.19.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Feb 2023 08:20:00 -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=Fx2gl8li; 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 1pSKUg-0001fz-Qq; Wed, 15 Feb 2023 11:18:55 -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 1pSKUI-0000hW-SC for qemu-devel@nongnu.org; Wed, 15 Feb 2023 11:18:39 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSKUA-0008RO-8n for qemu-devel@nongnu.org; Wed, 15 Feb 2023 11:18:28 -0500 Received: by mail-wm1-x336.google.com with SMTP id f23-20020a05600c491700b003dff4480a17so2641325wmp.1 for ; Wed, 15 Feb 2023 08:18:16 -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=byjwIFfgSe6JHFt0da/kKLLZa+4oG9V3qoed2WoaFQk=; b=Fx2gl8liRVKqMxhcMCOMGskxTZCveOI02Rpqetf9cnG7LOJ/0mxePZCNHgd0ptdkTj 3N6Fk82BcwsRrtqltrS8AoVHbB7kJMoTmgai5dZuSjI07nzveu/1iAWQ0+HjvBTFqC6z 575Uyh7r/TcAx0cPvrRGIx2AdzRIWddI9k9XkDqddXv5+3nEZwkSP3UcLOIYtMLWnzUb hFDAoAL9N+/SVHMiraNIrvuCj64a/JpFnjcrM/8yGbs2/S6sk41dir8U8meFV3qW407i b+YfvFJ1r2zAw3/7V4b6nefZz8lYRCCU8GMWYs22j2MUmHOgfrkIAKQphaFcsy+AUpgp LPrg== 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=byjwIFfgSe6JHFt0da/kKLLZa+4oG9V3qoed2WoaFQk=; b=mbjaQi/WylLj6jN4zGNac0PuuIe4TpFAhuYX52a+zL/YZQTAYKz6vF0pt8pnIDGrDr f9CpC1BPOD0MMHiIko+zsayXlY3GAEr34bcO12rDrN0bKF9okr31Y5nUnE3Uz9FsMYVS /cCoffcZAXtKyV3kvlvUeaSTvu9OMuao1dgPwmsktXs05GUnzlzYYKfOnNyvweFwvWXt HlJmXvhWnrEaYqNTg9uKDTxU1CQ0INlMcJzXKlVq4W6EzFA4sw6YHPeCE3He9hNTnMc9 Od2TFFUBvPEWMj8+hfjrfuzAJNif4Jcaca0A/lPpBJE2vLx3EB3QufuDXGsevBvm7mZA MR5Q== X-Gm-Message-State: AO0yUKV3LTyU11hKrs2ZM95IB6PR1UYch2iutWGI34Mty5OSEljBh6A5 tQxl936hQnUXjFqMI6NSQ3qA2yzSsq4iUQCC X-Received: by 2002:a05:600c:997:b0:3dc:5b88:e6dd with SMTP id w23-20020a05600c099700b003dc5b88e6ddmr2389642wmp.10.1676477896328; Wed, 15 Feb 2023 08:18:16 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id c3-20020a7bc843000000b003d9aa76dc6asm2461380wml.0.2023.02.15.08.18.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Feb 2023 08:18:16 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Herv=C3=A9_Poussineau?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, John Snow , Eduardo Habkost , Paolo Bonzini , Kevin Wolf , qemu-ppc@nongnu.org, Hanna Reitz , "Michael S. Tsirkin" , Richard Henderson , Gerd Hoffmann Subject: [PATCH v2 17/18] hw/isa: Un-inline isa_bus_from_device() Date: Wed, 15 Feb 2023 17:16:40 +0100 Message-Id: <20230215161641.32663-18-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230215161641.32663-1-philmd@linaro.org> References: <20230215161641.32663-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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é 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 719f2e96f2..f44817b88b 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -167,6 +167,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 1084d68ead..c9954a7d99 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -96,6 +96,7 @@ ISADevice *isa_vga_init(ISABus *bus); /* isa_get_irq() is deprecated, please use isa_bus_get_irq() instead. */ qemu_irq isa_get_irq(ISADevice *dev, unsigned irqnum); +ISABus *isa_bus_from_device(ISADevice *dev); /** * isa_register_ioport: Install an I/O port region on the ISA bus. @@ -133,9 +134,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