From patchwork Sun Feb 12 22:47:26 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: 652827 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2123242wrr; Sun, 12 Feb 2023 14:48:39 -0800 (PST) X-Google-Smtp-Source: AK7set9nYbVP2rm72wjreQT0/JBzPv6q6cfjgiUmoAUFqvq6zTUy4lyJMc8vLtGkwXhWIYtQ4Lno X-Received: by 2002:a05:6214:20af:b0:56b:fee1:e873 with SMTP id 15-20020a05621420af00b0056bfee1e873mr38429855qvd.47.1676242118968; Sun, 12 Feb 2023 14:48:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676242118; cv=none; d=google.com; s=arc-20160816; b=fgmrbpik51bsoAQwh6gIpf1H8RFbiazpWusHhW7M85GH8jokjwBrckn1s/qDirbXtS Z/3hfaEVKP6yJormwF4kYqIynbFIbCGPSiClO0vKNTMNCabKhV683x2q5H6RQT1EYxY6 u4tMJmDd/tiPgBBglRvJwxRzRbU1CejZG3MTngAG3O6YEnNEum8nrTqVJB81fcDJCxTu hg4mN0gXhH3MFHMYt1z0LcP0+fvsuQyDqy6G2f1I38IPwiADqzUvFKexVTOvYrveau69 3Z4hwgSE8MadEWCberzvQApP5YUwLiQ1OT3RKlQYXXvo2d9kCklNdwWB9wUMVApzRRBh lulw== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=hn5t9rWqhPYqcOHSrcmCkpyIrra+INbFtqDNLO9w6V4=; b=GAY7VDf4C1hvyn0vVfO07NsIR09aKhfudUF2GOa79BX5kKgtQ9vVOw2UG8X2xXKoGM 3Uu9mLhfqZMpvsDSkRDnkO8NtbjsSKds5hRedTFb/09GhkRLzHAjEx/bhUBrE+PAoj7c TvwtkirZ+xqlua1C81S0JnMPbwWdNndKeECtvWXvwALCKKRksMZCzJdKgNKCrIqaltiy SIQ/s4s7aPpkwtEkd62laFsWTZmSjcCTX+Kmo6XKcohhiUxy1P9w0L/22URKeKw1u6kY i+8qwuF4tS1j7x6LJC1oM4UrfNqnYIBAkYRC5o7jvxeze7ZOSoGYLRs/mv6aOn4qKx/B rRHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lv8NEax2; 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 p14-20020a0c9a0e000000b0056eb16d587asi939169qvd.444.2023.02.12.14.48.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Feb 2023 14:48:38 -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=Lv8NEax2; 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 1pRL8G-0001Lf-L8; Sun, 12 Feb 2023 17:47: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 1pRL8D-0001Kp-KW for qemu-devel@nongnu.org; Sun, 12 Feb 2023 17:47:37 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRL8C-0003HZ-3J for qemu-devel@nongnu.org; Sun, 12 Feb 2023 17:47:37 -0500 Received: by mail-wm1-x330.google.com with SMTP id j29-20020a05600c1c1d00b003dc52fed235so7756186wms.1 for ; Sun, 12 Feb 2023 14:47:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hn5t9rWqhPYqcOHSrcmCkpyIrra+INbFtqDNLO9w6V4=; b=Lv8NEax27QCEgplsdcIt/KDsET3rN33yNppRIl9ehnHVrtY2mwe05Pa1YXNJG+RVMk zV6N21b+ZlNOpKrS+mIF+OSYjiryIvauQjrXuxMw358qV8b4pIurA8wgOQz8AhJE1VeS ACDDJULkHbupUjvJcC3bsbgEMnmYzePWkWgNgmncr/+KxbelBjOTBZ/k85EO0HEI7inF y4bCC7tXaVdR+WUFwDcC9F1JbD+ApDXOMxkxh9tCN47JMvAcO4tdy6rWulLPpe8kEbPf sXNMsL9h4NZQwN5vyvScCuI+sGJK2anOHgb2LTwbyFE5jznv2mf5cNTxZv5yEhwZHXl8 XaCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hn5t9rWqhPYqcOHSrcmCkpyIrra+INbFtqDNLO9w6V4=; b=Ix0DuqYED7QxgnnX6MiXj6kurfNS68L1xhiHLqr8CWWrjZcuPYVULj+rJmxFTfmlJ+ b3DKmifS5CXDJzLbaQl2/3mKm3sOv/X2jylQSYEh+MKm0jQcPT5kdjG2nEfpcyp1sYJI qqhP1Jzr1Mw8n+mpXkAU5JCgOuA85RzJBdrMizXThznTdjn2Uv0Vwh20+l8vTe6sA8WM vZqmw5Ydogy+Twq2fte8akkNC0wtd5k1EfWk8GbbXvac1iynrZAZEFc8cmGtBhrweh8M kMzVEJakBSyL2cqbQVgUzygLGtLFU4C4JQCOqF2Bd8n6kYsHPyDsjCIVcXv739K6wmzb yKig== X-Gm-Message-State: AO0yUKUFFDvhH+xl+YA3cgHaVzkcWK/EFlpDF5CCZ8aQM9BYezjxpnls TAhxmDmc9oYnGK7QgpoQRR0WjLKmuwBLWyFk X-Received: by 2002:a05:600c:1898:b0:3e0:185:44af with SMTP id x24-20020a05600c189800b003e0018544afmr3113478wmp.20.1676242052513; Sun, 12 Feb 2023 14:47:32 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id l19-20020a05600c2cd300b003dfefe115b9sm13355858wmc.0.2023.02.12.14.47.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Feb 2023 14:47:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, "Gonglei (Arei)" , Eduardo Habkost , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 0/4] hw/qdev: Housekeeping around qdev_get_parent_bus() Date: Sun, 12 Feb 2023 23:47:26 +0100 Message-Id: <20230212224730.51438-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 DeviceState::parent_bus is an internal field and should be accessed by the qdev_get_parent_bus() helper. Replace most uses. Philippe Mathieu-Daudé (4): hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus() hw: Replace dev->parent_bus by qdev_get_parent_bus(dev) hw: Use qdev_get_parent_bus() in qdev_get_own_fw_dev_path_from_handler() qdev-monitor: Use qdev_get_parent_bus() in bus_print_dev() hw/audio/intel-hda.c | 2 +- hw/block/fdc.c | 2 +- hw/block/swim.c | 2 +- hw/core/qdev-fw.c | 9 +++++---- hw/core/qdev.c | 2 +- hw/ide/qdev.c | 4 ++-- hw/net/virtio-net.c | 2 +- hw/pci-bridge/pci_expander_bridge.c | 2 +- hw/scsi/scsi-bus.c | 2 +- hw/usb/bus.c | 2 +- hw/usb/desc.c | 2 +- hw/usb/dev-smartcard-reader.c | 16 ++++++++-------- include/hw/qdev-core.h | 4 ++-- softmmu/bootdevice.c | 2 +- softmmu/qdev-monitor.c | 6 +++--- 15 files changed, 30 insertions(+), 29 deletions(-)