From patchwork Mon Feb 27 14:00:44 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: 656992 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370026wrb; Mon, 27 Feb 2023 06:07:49 -0800 (PST) X-Google-Smtp-Source: AK7set+6sPcoRVe+Grpxm4toa5ZTgOmStIiX3ByGmKiCsahUOiVqv0/G+S/vAgqceGeoNHMx5mbu X-Received: by 2002:a05:6214:f2d:b0:56b:4e51:acd5 with SMTP id iw13-20020a0562140f2d00b0056b4e51acd5mr52069527qvb.12.1677506868926; Mon, 27 Feb 2023 06:07:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506868; cv=none; d=google.com; s=arc-20160816; b=raq04qev4G0u2kYSNISgCvQn/AbBRfxHumJ29RT8XDtyjgljQVKsytoBUR0UUInm7G MdDbXzqBOuwoJkVnqeyjsr4kro8Xi+YVJ0eCF8m65EC2L3Z5SPNh85sEDjBiQvN9jy37 2c/RMjLuC53B3vdCScJ3eGcpPKiGGPj+VL0IX92rKnxORETo1rCZIDKxjeSB5Igd7DJQ kZWMZ216gvSP+A4sgv31k/Crv6bp5sUW8S+pPrUpp2PDe7udfLBzsf7jeVAhFlqUo/yQ Ei6tB6mvMIIwASkFq8MHWs3thnGNi/6n8cMZZnB7z7jDyQEGy/fd2eyUAlXPzrlANPPd BNUQ== 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:to:from :dkim-signature; bh=hqZbA/VxjYps6TlZPucyPAJK2NQRYopiLwtGGc2bqQI=; b=XejsOEkuPWdYiuybNKtfESEWf6LwW1LPH/rOtaXrDV+Qj2f9tJBl31AoT1tbMB4ybP 5q9mYZgeIl6Z4slBxAYNcG9ukT1xv+Zsv0ND50EbnSSWvrxr4MrF1ytiwXEIA+VHQ5wg Mqx3C3BXMnONSKvauVSLDZVDpruIGG4wd9s0sOCjWEsEg6Aokn8yAvCE1F8cnuKRq+LT oRDszBVlOOYDC2OVpSATg10c7szBGclF2d66knJr6CqepGPQEbOYtuPup1v+Ez1twbt7 wvVpF+Lh+JR02nBbfrmYwJIO0Ak9PmFJ7VmK95prWhW+h4M6P26yja6Y0xAbZamuue60 hB0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iD9WZ4G4; 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 r9-20020a0c8d09000000b0056e9871bbc0si6887503qvb.23.2023.02.27.06.07.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:07:48 -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=iD9WZ4G4; 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 1pWe7T-0003Vp-PM; Mon, 27 Feb 2023 09:04:48 -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 1pWe7S-0003Mw-6A for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:46 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7Q-000827-Oy for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:45 -0500 Received: by mail-wr1-x430.google.com with SMTP id bw19so6310966wrb.13 for ; Mon, 27 Feb 2023 06:04:44 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hqZbA/VxjYps6TlZPucyPAJK2NQRYopiLwtGGc2bqQI=; b=iD9WZ4G4RiqSx4nmA1C7z2o4SR4zuBBqV2rnZoa/HXx9aBO3Iw/fHzINbxN0ekAlwq S8o6Z4Lhu2sF90EPpLjEHX9nh4NeRWGuIAxdHSHwnJQoAW1VPweXU8SJ17h/qx+4XoZP lnOA7f6bjSiKY1vbMeLvjI5Tv2Vg4TpEZbQZqA+DToBJ/mGqvUUZn7iLkpvdo2+0n5zD P9oq0VGKYeuXaNZmVjSbNBnCrMwCyo8jwSbGIzFP4RU9DqRQ9Du7vM8VFnqefW3sHoH6 q2Cy8ZCfXca7RQ+le46utAVRa1RkX3BWji4Wd1TyaaaSOCx/yWamAfozEBFXDh+9HdQu yEdw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hqZbA/VxjYps6TlZPucyPAJK2NQRYopiLwtGGc2bqQI=; b=fJhfOS+LC0cZc+Q7nEcwmNCb9XA1AJKlS8mtV5D5odqh1cVxndMyGKofSWLHZWuqM8 /SLE/ftIHWd1peYk8xEk/Inp/pXtusNRZmzjIfhWh8HpobFXFzID7ruGSrXLo9L7YhO7 pulkkJECmn5oJxJsA7JjdOwkp0QggGHnftnZpGSC7gwCo+6mDfMg5I+uv2uJQ/VXezM7 Br2V+oKLOShha4+nG/VW6US2ywpA0pc0oxyc4dnCoRmCBedO45QZEwbybJ0U2C4P0O/B fjb5O9V/FVI2p31jj5xCnTiUEl8VwOJufr5t1K43Hdwq6plCT9g2e7Y8BF7jUucVKHrD Y5hg== X-Gm-Message-State: AO0yUKXMp34uBtsW8XimLDE/Qj9TKU09qy7JCdmRFmLdSgN5mm2N5r7Z pSLhoLH4CrzH5/exQlh222ZZCM0AqrlJ4tH6 X-Received: by 2002:adf:ef06:0:b0:2c7:da1:4694 with SMTP id e6-20020adfef06000000b002c70da14694mr12989686wro.62.1677506683236; Mon, 27 Feb 2023 06:04:43 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id s2-20020adff802000000b002c706c754fesm7259928wrp.32.2023.02.27.06.04.42 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 037/126] hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus() Date: Mon, 27 Feb 2023 15:00:44 +0100 Message-Id: <20230227140213.35084-28-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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 The structure is accessed read-only by qdev_get_parent_bus(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230212224730.51438-2-philmd@linaro.org> --- hw/core/qdev.c | 2 +- include/hw/qdev-core.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index d759c4602c..43d863b0c5 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -330,7 +330,7 @@ bool qdev_machine_modified(void) return qdev_hot_added || qdev_hot_removed; } -BusState *qdev_get_parent_bus(DeviceState *dev) +BusState *qdev_get_parent_bus(const DeviceState *dev) { return dev->parent_bus; } diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 35fddb19a6..f5b3b2f89a 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -715,7 +715,7 @@ static inline void qdev_init_gpio_in_named(DeviceState *dev, void qdev_pass_gpios(DeviceState *dev, DeviceState *container, const char *name); -BusState *qdev_get_parent_bus(DeviceState *dev); +BusState *qdev_get_parent_bus(const DeviceState *dev); /*** BUS API. ***/