From patchwork Mon Feb 13 18:43:34 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: 653211 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2581290wrr; Mon, 13 Feb 2023 10:46:03 -0800 (PST) X-Google-Smtp-Source: AK7set9MQ7uTRt2c9mnjtYF+F88TTWi645N5IBc5eixoaHcS6rIdZClDi5mrHrLaBHKRSooiFLbJ X-Received: by 2002:a05:622a:81:b0:3b9:a641:aa66 with SMTP id o1-20020a05622a008100b003b9a641aa66mr48040277qtw.15.1676313962840; Mon, 13 Feb 2023 10:46:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676313962; cv=none; d=google.com; s=arc-20160816; b=CPRNdmD73m6KQeiT8/v4BzzyPFHDeI8WjaqPXNgiWtT5DrSQcjFc8fRTgG+bDzCsh9 fl6T4HPqsF1QvpCPGPOPJZSf+nKD1hILihme/OTQgUnijO4dQpbNEiUYKpW9NcniaNBH I+GxQ+dUBZC58BrYBihLs+tshf/fkoRe+A9Pj7S+wJVQLg+hXwwQeQV3zL01YOeCmz5N 7nK3mthD8ulB+a7SsnYGhfK0kMr7AHtcImT2SCkurvwPOSr0jWYeT25ryc86qFiTMXbD e11tUWtGylLLVMrTCwqg95ud2AyPpQTwj/lyXVyVWOVCCwzekYCsIz/EqbNdP+GaGpHF HR/g== 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=3YnlWYrFQuWXt1rppNJud8kwI6R078rMYORIY8x9Pr4=; b=cpnhqaYoQViQ8BBHk4oHPA2ANsMSgJm6Pi05yBLAuXpnPfghdJOuzN7zmLHL2uIA0k cJA7lZfGaN6wr4bKykeArjsnVF5nQjCHo7FWkj+S73TdCGE0k8Wjig5HEW1NGlmWEtMu 6apOGztKc+s25jVKMVPi7Yyc27v8E98be7pSk8uo2eOBy8rfEjByUgVJyOvbUwCWwcYu nh97eVO0yjj/DaWmCnPygcvOtknyhEckGwofNqnpoyFhE6l+93doMi+bavM0P76IphyH oBMlWefhyypmQWICDRvtp2Fnkusa+cMwN3KQ2sTbhTDzUs+MlJ7jee7OGQERIBFXSh8k tswg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BfsZ/BP4"; 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 3-20020ac85903000000b003b63791e5f8si10671233qty.623.2023.02.13.10.46.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Feb 2023 10:46:02 -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="BfsZ/BP4"; 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 1pRdoe-0001nB-6I; Mon, 13 Feb 2023 13:44:40 -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 1pRdoc-0001hf-Bp for qemu-devel@nongnu.org; Mon, 13 Feb 2023 13:44:38 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRdoa-0008T9-Fz for qemu-devel@nongnu.org; Mon, 13 Feb 2023 13:44:37 -0500 Received: by mail-wr1-x42d.google.com with SMTP id m14so13242538wrg.13 for ; Mon, 13 Feb 2023 10:44:35 -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=3YnlWYrFQuWXt1rppNJud8kwI6R078rMYORIY8x9Pr4=; b=BfsZ/BP4Bj77HitzpAxlAgqnSThR1vBBm4ORMLX3gPBBk+Yt9lLoiFO5JNcCQ/CrTQ 5ZLRYeMaTkKUIZpiCo5h6WzLQwUf1UOFFiyIGdFE+FaRHVruAZFaQ1il4/10R0jz/yhR DunoSIYVsXnAXXQ+Uhl89HK6YJDbaKCdLR9emwlSoObFYTL9YvtSetyVVcK82f9C/FVU TzX8A7LPSwPlSWSg3JVfGUJMIPdq+X1VaftsTe3iGjOdTYDLkvGQNgTN0QFsNi9pEOv7 ORjPr3HuW8kpgqHhaAa7KokUtEmdl0RDdSBp5W2DdLpBVAAzX5dUeUulpq23wNdmpjJE XVeA== 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=3YnlWYrFQuWXt1rppNJud8kwI6R078rMYORIY8x9Pr4=; b=nmw52/FNX6uSzEhb+kbb2a3avtTs6j1Zj5EQxsZRuXIYAkR4QrdEL6onFXPT5XxJKB W+Uq/0x1YIKvhuuRakgy+wUYO9//sHYwzxQx6ubMx/EdsdLWHgXRDm8pzEOSSJ20QfEk vfj6XoCKdUOtk/IPflBk9EItotDH2UJaqeeOhX6BNAaxsi3GOFUbnHZL2Cd/AJuJUDmn HDiLHxk8Vboa0ccav2+7Zuy1ht0xQnjrV5AcUuK9LX6mo6BKAHtZFqbCgrf54xlluwP4 9O8QfuqsFMcl8Hdvh4Lv9Tkatakow0gc2vqV6hsUT4eO+Ele1eINxBKS0TdJH3MT/iIb lRjg== X-Gm-Message-State: AO0yUKW6JU1teBBO80QXzEyOShs1686c326ZA4mtJ5W5sCOOP5NrhfMm r1+KQKycKSaFitTOwPp8FfHgJ7RtOQME+QJt X-Received: by 2002:a5d:5044:0:b0:2c3:eaff:aae9 with SMTP id h4-20020a5d5044000000b002c3eaffaae9mr21611803wrt.19.1676313875408; Mon, 13 Feb 2023 10:44:35 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c3b1100b003df5be8987esm19080586wms.20.2023.02.13.10.44.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Feb 2023 10:44:35 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Eduardo Habkost Cc: qemu-block@nongnu.org, Hu Tao , Gonglei Arei , Richard Henderson , Li Qiang , Thomas Huth , Cao jin , xiaoqiang zhao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH v3 10/14] hw/pci/pci: Replace DO_UPCAST(PCIBus) by PCI_BUS() Date: Mon, 13 Feb 2023 19:43:34 +0100 Message-Id: <20230213184338.46712-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213184338.46712-1-philmd@linaro.org> References: <20230213184338.46712-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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 Use the PCI_BUS() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 2e785e3aef..ae5c33adb6 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -391,7 +391,7 @@ void pci_device_reset(PCIDevice *dev) */ static void pcibus_reset(BusState *qbus) { - PCIBus *bus = DO_UPCAST(PCIBus, qbus, qbus); + PCIBus *bus = PCI_BUS(qbus); int i; for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) {