From patchwork Mon Feb 13 07:04:18 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: 653164 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2265624wrr; Sun, 12 Feb 2023 23:07:17 -0800 (PST) X-Google-Smtp-Source: AK7set/Ek0ZOxqRuuxe5Q1Cu4xPAzi6WvhhBCf1XDIr/KhgPLPg8bft2PofYYNSRWhCsu722tsCA X-Received: by 2002:a05:622a:18a:b0:3b6:45f1:4933 with SMTP id s10-20020a05622a018a00b003b645f14933mr41524667qtw.66.1676272037818; Sun, 12 Feb 2023 23:07:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676272037; cv=none; d=google.com; s=arc-20160816; b=xUNMk1ryP8hLYXU/a4R2A+LzrfpOGRa9dkxiJg6445UfeGxVOIeCQ7z5zCOJPKFsKF 4SZ2wg7952qdhte1fBZDrsYLjMDw3i9npY7/iJV274D7IM6+dlHg+W4N/j0psW0qmmBb pAnF1mvP3p4FZsp9bJ1HKC1XaEKvAL6qYNEP8rnR11WpUNTgdU61Dx/GPMkplAjmLBfn 8LuOcvVfUYQ6x7/eK7d3+C+uUXBcJQJ7w+dv1puhs2TtKe4dxBHR+koo1zyW+hMikto6 fsJ+Oq76RFPea2Z1TNm7wbnGG0AHx08uKL3vouf0XENFhob0hZOmnJgxDT/W6yJls1Jq lxXw== 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=Jz/OlZ7doHa0+NAa3PesX+R44gnSBsZj1QZteHGnoxI=; b=V3G0+L9kLR6LgDTWEMyv1ALerf8AF0/XTnnav/peodEnx1MmoFOfV84fA8dEiDzKBl cnI/98VidLB4IO9s0wkyrNmfd5zzTXFbho9bOz3Sl5ubGJ8StL33XG/obWOGOui+nm34 6wjMDDS/luqBxex8Gom7V5Qxn8NAGUjJgk/2aXy04R2zSy18D4pCDCFlUA8y/y1imlux OD058ejXKcKwK445Sfmj1ZYgJJmxi+1OtzT4r5soBEBO1s+tCjIMVGmplkr8WRllnoxq 3PLe7QJ/+m7LpN4HNl32aDYVLbTDGvDbSXoVm02UGGGzzl7+D/uEKSU3pSiHNgAcBHP3 8AtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PaneiVAg; 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 n6-20020ac85a06000000b003b63338abc6si9037808qta.12.2023.02.12.23.07.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Feb 2023 23:07:17 -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=PaneiVAg; 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 1pRStP-0000nc-Af; Mon, 13 Feb 2023 02:04:51 -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 1pRStN-0000mQ-Bt for qemu-devel@nongnu.org; Mon, 13 Feb 2023 02:04:49 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRStL-0000le-QV for qemu-devel@nongnu.org; Mon, 13 Feb 2023 02:04:49 -0500 Received: by mail-wm1-x32f.google.com with SMTP id az4-20020a05600c600400b003dff767a1f1so8224235wmb.2 for ; Sun, 12 Feb 2023 23:04:47 -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=Jz/OlZ7doHa0+NAa3PesX+R44gnSBsZj1QZteHGnoxI=; b=PaneiVAgygXpNEZZOPRCvF44cqCZnBm4lAjQlFA7KxLHym9zhssUcmma3K9w6WgrkF 5b7iQIfY1i2jULxJXuP/JqffoyftFHNt7145tv8p0DH7nvfhTmb+fl3tFCuRRsWbXSf8 A5MzBFSj5NUV1wt+TGbdN5382meYuQy91QwJpvnVs4Yd1w+tfsjrBwDqPSd+wNh7fmOy r/KQ7uufc/2hne4vq1EB6F8/efc9Gx2Yhr29uQh9q4zjAMJlzdmzM8MRmUtK1BlPLx1q dFqY3UyhSX6sBaJd75E9mBvMEikHjzBADG+LNSiNCsVcQ1Prqe1ZUBtTnMnc69kuiaLS 1prA== 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=Jz/OlZ7doHa0+NAa3PesX+R44gnSBsZj1QZteHGnoxI=; b=RZWRVS2Ot8mjCNqr8cDZfZeswVh80hXfUokp4wfCygY1/WgHJxzEcAx5G4+m1lECmm z3OI9KBZ8hF8PxHZgaeBwJcqx41+kHcXXiZi0pSVxEPtiQvZPJbNL6LERncvYuAWG8OI xBNiHOxtJFBWVh6sODT7XHJl/scEyolj1AIu39BY8Bh/iNyoob7fi7TRQplVR9+ImPnz NRSfVME8dEWHRtwI+pzNGJl0TfRxr1YW1ck1AUcIyAi0al6Ed7cKFxgCm1xBcahE+5WQ BON0cLxXGDpBq2qaZo8tVk7wiLbpUfk20ITUh9nVN5uWSaQnIM62zAZAVPKHCMe6T7B6 snrg== X-Gm-Message-State: AO0yUKX9vTZ8ucgon4ivFh6Mhf0IJ9nKYqWpnBuooxMvTsJNC0YZjyLW lyFzgCwQRDWudO69UtRPg35wFiV8vpEPOakQ X-Received: by 2002:a05:600c:16c4:b0:3df:f71b:3f68 with SMTP id l4-20020a05600c16c400b003dff71b3f68mr17867842wmn.39.1676271886311; Sun, 12 Feb 2023 23:04:46 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id r14-20020a05600c35ce00b003dc4ecfc4d7sm13827394wmq.29.2023.02.12.23.04.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Feb 2023 23:04:46 -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" , Jason Wang Subject: [PATCH v2 4/9] hw/net: Replace dev->parent_bus by qdev_get_parent_bus(dev) Date: Mon, 13 Feb 2023 08:04:18 +0100 Message-Id: <20230213070423.76428-5-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::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 3ae909041a..8bc160ab59 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3423,7 +3423,7 @@ static bool failover_replug_primary(VirtIONet *n, DeviceState *dev, if (!pdev->partially_hotplugged) { return true; } - primary_bus = dev->parent_bus; + primary_bus = qdev_get_parent_bus(dev); if (!primary_bus) { error_setg(errp, "virtio_net: couldn't find primary bus"); return false;