Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 796B4CCD1BF for ; Fri, 24 Oct 2025 19:06:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vCN6r-00028t-W6; Fri, 24 Oct 2025 15:05:58 -0400 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 1vCN6p-00027R-9p for qemu-riscv@nongnu.org; Fri, 24 Oct 2025 15:05:55 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vCN6m-0005KQ-Tx for qemu-riscv@nongnu.org; Fri, 24 Oct 2025 15:05:54 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-426fc536b5dso1746937f8f.3 for ; Fri, 24 Oct 2025 12:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761332751; x=1761937551; darn=nongnu.org; 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=FimQXnCYHKm6ncvC3S5Pc9wwaP1Ko27xUZV6rL9UQNE=; b=xVksornqzr5W0Q7/tyitYhH8vL5Y19YzqdSTRZI6Hnlxo/WsSh7HjwYXrDFyVuw01b l4IIsvmUS0ip1BWAkrExdWcaXxoIJ1zZtcqZpml3UioguFEJw+FTc42NzlpkWqPoHQBd 9perQJpBF403n6xHmATZuG3aja15Nzk4TyjOOTk7p7twjzAlkARfbhGrUAPK5QZghLaB HiToLgHljQ3Twx5AsJKzJopJ8PEl4n9g4d5lscMZLQtn2RN2k1UKILCSACN2xG7x3Lc/ UJVyIdSvaRJl0V8t93nv63egXYbJJt8RgZP/yoFD7SjrhhRwaZHl1L/vy5xC0fEN22ue dmLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761332751; x=1761937551; 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=FimQXnCYHKm6ncvC3S5Pc9wwaP1Ko27xUZV6rL9UQNE=; b=v7P7W2VO3puYck+wivcaD+1OrYln3F2eI+gYd0cznUuyaSBvTUgwXaGVwAJRrHxxG9 ymLQ4PpzFa+v8FJdD8zG382Bl2il7E/XClBsHrR5/wTpNV8WAT/TlWJS4Ef3NYTIZzY1 dFhWyGt9f1sllJ4tRBZocKHKfUtUxq800Y++CsZhpqKGPpCq523UEqytwmquCfbbaJVE r3CYt7ZBEMX0vtoq7DLh7QbMyjVVMVyfgE3afeoHV3FGf3xxN1bMnU4g1USeLEwYVy9q f8CLKvJJLwaXt9FazLvSlu7bv84a/kWU+mtZ+CqY/tlFU15Lan6YoClBY0yvM/Fdkylb 2U4w== X-Forwarded-Encrypted: i=1; AJvYcCXpHmIsG816tu+Omwqp8dFx8HKoBoTazOu68iUEgnkvx7Vl3v/DT8hUriw5jsZ51kbDfBCKcZwqnkWc@nongnu.org X-Gm-Message-State: AOJu0YyLTB2xgdf5bRhQHnfFVnP52EjQ7rNh+IC4ANtCWZPJMu2x1hrq D4egDKyyPQOsaNIxC/nwZF8Et+a6xpSAlwo/YKo7XP6mKi2V4mkvHBeamEnWaD5dLdk= X-Gm-Gg: ASbGnctWZkXNm2vUhw8Lrss+bqm6HogDTgb1DsExuzVOW8nYvjMW9Cv7qMyZubM8JFy +hi1BQOp/a0ofMoEaU8iZieRNjyKKsyXTz7+Vf3Cw2Xefo2F5G+cb5YwAMfoTPPSfRbkxI6I8ZN u9ggQoKeEcscxTX9xE2FwMwKaxlizsDDjyXAt4Jfz5q9HR9EC7jJWWj6TTkC7E+JNS+6UITjkqb Eg8Lav2PyXFB8DwdQfTq75u8ZRp2YIzm3XcE48Esrkib+C6n0a+r9kLOE/JZpXI6az0Em6geN79 TNBmR2fMB950PvbBsahuLrvn/5E4klywdK55r7iFhdk/Q7r1YaB41+qX+O/79nyi3bbQmOUlpgy uAvl+ythpqoEipVnpGe7bnwUyQs7dgrRcy8txS2/hMX1Dbcbk2LAN6WduMgycCzuOjXiqfOXFPM XsX8Q4DYP510EflmoWPN6/cUpg/kO83hxTbeXW0jjbgWbsK2MkUFtfkLLzR0yV X-Google-Smtp-Source: AGHT+IFKoLkMs5+SowOaBcE+d8/5jPxLp08ETkRhmQ7aRqBnMfobElkOPpHUE3vyYwWq5FBgfpakRQ== X-Received: by 2002:a05:6000:2dc6:b0:425:86f0:6817 with SMTP id ffacd0b85a97d-4299075b4a0mr2530630f8f.57.1761332750813; Fri, 24 Oct 2025 12:05:50 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429897f57cesm11088658f8f.17.2025.10.24.12.05.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 24 Oct 2025 12:05:50 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-riscv@nongnu.org, qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost Subject: [PATCH 01/27] hw/qdev: Have qdev_get_gpio_out_connector() take const DeviceState arg Date: Fri, 24 Oct 2025 21:03:48 +0200 Message-ID: <20251024190416.8803-2-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251024190416.8803-1-philmd@linaro.org> References: <20251024190416.8803-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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-riscv@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-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Sender: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org This getter doesn't update any DeviceState internal fields, make it const. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/qdev-core.h | 3 ++- hw/core/gpio.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index a7bfb10dc70..2caa0cbd26f 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -725,7 +725,8 @@ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, * * Return: qemu_irq associated with GPIO or NULL if un-wired. */ -qemu_irq qdev_get_gpio_out_connector(DeviceState *dev, const char *name, int n); +qemu_irq qdev_get_gpio_out_connector(const DeviceState *dev, + const char *name, int n); /** * qdev_intercept_gpio_out: Intercept an existing GPIO connection diff --git a/hw/core/gpio.c b/hw/core/gpio.c index 6e32a8eec61..c7c2936fc55 100644 --- a/hw/core/gpio.c +++ b/hw/core/gpio.c @@ -129,7 +129,8 @@ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, g_free(propname); } -qemu_irq qdev_get_gpio_out_connector(DeviceState *dev, const char *name, int n) +qemu_irq qdev_get_gpio_out_connector(const DeviceState *dev, + const char *name, int n) { g_autofree char *propname = g_strdup_printf("%s[%d]", name ? name : "unnamed-gpio-out", n); -- 2.51.0