From patchwork Mon Feb 13 07:04:19 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: 653158 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2265073wrr; Sun, 12 Feb 2023 23:05:32 -0800 (PST) X-Google-Smtp-Source: AK7set+OC8WJowKm+mNHIVWixtQpcFFSOSgJQB2ul1g+Ba2/9186xnpk0EdSAaPjtPyOIE4zEbVK X-Received: by 2002:a05:6214:e41:b0:56b:7ec7:b158 with SMTP id o1-20020a0562140e4100b0056b7ec7b158mr42289200qvc.36.1676271932108; Sun, 12 Feb 2023 23:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676271932; cv=none; d=google.com; s=arc-20160816; b=gpuZ5tKA9W/Mm+WMEX/PD35C+8Xzs9Aph0NeUS7m/QiAM5i25bm+J6vi9BrpBv4e/h AtNwdcf1rvACTNbFoGYEmqiWcfY5r7QN8m/ij3Y7r8MMdhJyoP0c+9aluIbrWFFacsrs GXSsvnb4uPBOqN/k42pREyjo69fialX+yaepxEyZudFXrlyHfkWPSgTyT1GGbEGeF5+2 NoqgL8XPEwywNhagU8NLC0tgPdjSrGJOPApb6625ZylMtESC2XGWdVKeXIJyBDopE5fb oIR20A1XNV4a0eC4d8vqX1EJmpsK9jAxx7a6PvHUpzMuqMjnkHmdSKiRlJwZQrA8/hsH 6YBg== 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=5xw6YWbqYTi/Ye8J2dXQn81KMiMRy7Drw2jaWnSC+88=; b=Oloft4tM642DcUk4s5StjRzWTfoOIe1pc5zBg3G/hLq4TZZveelxLNsiNKE7ggKLyh TdWVjMXD4LFViEDLyhnxk6LBRxeTIjLZD75Jt51qnjq5f42xvVQk1SW3iBKPDRC7c0/K rrDbFG5jE3ipuwhsKhR21W+1LIVdRlPJ7PmFtFDAmDRPcvkhyKndcgPWSSC8Y8TE+ork /7xpj2EQployqdsEn0jBlcI9Ha8+aocB0f/XYoUJZlwPChvpZhWF2+Luxx5649rvFUkd 30IbK2c3p/mZNhJ25CmKR5A5ahAIAqRHgthfTExySJuXCVr37jQFlSYx9sFlSn+DIXQc gZTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ioPYMvi6; 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 i6-20020a05620a248600b00721bf7bec5fsi9689627qkn.441.2023.02.12.23.05.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Feb 2023 23:05:32 -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=ioPYMvi6; 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 1pRStU-0000oy-3X; Mon, 13 Feb 2023 02:04:56 -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 1pRStS-0000o9-U8 for qemu-devel@nongnu.org; Mon, 13 Feb 2023 02:04:54 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRStR-0000mm-5C for qemu-devel@nongnu.org; Mon, 13 Feb 2023 02:04:54 -0500 Received: by mail-wm1-x334.google.com with SMTP id n13so7993863wmr.4 for ; Sun, 12 Feb 2023 23:04:52 -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=5xw6YWbqYTi/Ye8J2dXQn81KMiMRy7Drw2jaWnSC+88=; b=ioPYMvi68OXe3G4515y+qHdHiDU8Fhk1Fr7O9At1ahbzlE27TqKTifQOxvdKmuqEwT oaMkcU6hWZZtlfE67Nggeg47hsr1IiK3hhaV4LNg9X3JAb0HyM51fB34/8wpGziQVuxo kp7fsFt83eOJ+h+QVlG3T690LJx6dzR3qeLbif9Pg3AkeNaCQ4eOs07V20DpiqJ5XN62 r2R34eJbqILz0O8naTtPLKXmb8D9YDyo3OuJhYunaeLTqRKbHYh1aDCSqgq0dOwmSam0 MviowIQph6WrPn4tb363rpSJNDZwyK9kIG3aHrN8lCJQgv4W2akFfafsvE60yy4se+0w BRCQ== 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=5xw6YWbqYTi/Ye8J2dXQn81KMiMRy7Drw2jaWnSC+88=; b=E1Gw2i7uizEdiJ6nU8ZLwS2ZHo4oG4TedjJL/ewwjjEsWquMl76GGWNu6hgR6MGM0l XqIpsgdEDpj8c1TWOUc38l6lQnA6D7OdCl3QXE0+9ACSessQIBPs/yWfHEBI5aRACCQp LjS6C4y6JFVb4AJB68KCdye84pw3Co3rapo/eHmY35TIl17jIhroXkYz4wHMa/YNZSOS RPJ92Rw/7O2QgxSp2vgUVwPiwwRd478Kx7hCgEhOGwkzcr6iXxm8vnPehsqTFw9+8svL MSVqY0hbvyUEDFH2kTlmAJFgitHgHOntfL5ycXP600AnImvmTRaq8dnzyArnC85ULUy2 MQ4Q== X-Gm-Message-State: AO0yUKVoSfuvN/ZW0mTQkAwLVktAUFJ0tXRFRw8El/JQZdPt/Cdj/Mh2 caxxZ54tItstOCZlOyj+rVcAN9BbYtO2vJF1 X-Received: by 2002:a05:600c:810:b0:3df:f7e7:5f01 with SMTP id k16-20020a05600c081000b003dff7e75f01mr17762961wmp.15.1676271891413; Sun, 12 Feb 2023 23:04:51 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id az10-20020a05600c600a00b003dc3f07c876sm16543292wmb.46.2023.02.12.23.04.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Feb 2023 23:04:51 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Eduardo Habkost Cc: Gonglei Arei , Li Qiang , Cao jin , Hu Tao , qemu-block@nongnu.org, qemu-ppc@nongnu.org, xiaoqiang zhao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH v2 5/9] hw/pci: Replace dev->parent_bus by qdev_get_parent_bus(dev) Date: Mon, 13 Feb 2023 08:04:19 +0100 Message-Id: <20230213070423.76428-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213070423.76428-1-philmd@linaro.org> References: <20230213070423.76428-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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 DeviceState::parent_bus is an internal field and should be accessed by the qdev_get_parent_bus() helper. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin --- hw/pci-bridge/pci_expander_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-bridge/pci_expander_bridge.c b/hw/pci-bridge/pci_expander_bridge.c index e752a21292..8c0649c071 100644 --- a/hw/pci-bridge/pci_expander_bridge.c +++ b/hw/pci-bridge/pci_expander_bridge.c @@ -151,7 +151,7 @@ static char *pxb_host_ofw_unit_address(const SysBusDevice *dev) assert(position >= 0); pxb_dev_base = DEVICE(pxb_dev); - main_host = PCI_HOST_BRIDGE(pxb_dev_base->parent_bus->parent); + main_host = PCI_HOST_BRIDGE(qdev_get_parent_bus(pxb_dev_base)->parent); main_host_sbd = SYS_BUS_DEVICE(main_host); if (main_host_sbd->num_mmio > 0) {