From nobody Tue Feb 10 11:15:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.52 as permitted sender) client-ip=209.85.128.52; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f52.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1639832700; cv=none; d=zohomail.com; s=zohoarc; b=fQqPNEbGeTSsaNbC1686YVlIzmoHcxs62bNj97tKxcWoqnPh1sxaZeUupfCCMVas3jwQb2eN6ZkJhh8xnUMq0ToD5otI+NWQL9GRlnj7f+R3WbJYL5g/f5dHqxde5TDVaMxkn7LQ6Dz5Dfi9K+e/4ipE46+nQFbpwqzxbiiNy9Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639832700; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GIRB66yypPPrKrwEsR87//zR2i3jDtWRs1HuHZDcrWg=; b=jOvCvHT0qyz9y0wLJWp79upW1FNu8GKQUdHLd7NIpubfVTSAvDdPdcCDVWO89Up0Mi/UFV9W+NPs7MlG0u4mnFn2HyQqbWJmRygjQthfQdP9519045IPekjYg0psK6TmkVDYrpD16XNqkhb7ntkvvADCR1eLeTgGCzhobodcIOc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.52 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.zohomail.com with SMTPS id 1639832700240979.9578150386219; Sat, 18 Dec 2021 05:05:00 -0800 (PST) Received: by mail-wm1-f52.google.com with SMTP id b73so3465037wmd.0 for ; Sat, 18 Dec 2021 05:04:59 -0800 (PST) Return-Path: Return-Path: Received: from x1w.. (174.red-83-50-185.dynamicip.rima-tde.net. [83.50.185.174]) by smtp.gmail.com with ESMTPSA id o4sm8757967wmc.43.2021.12.18.05.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Dec 2021 05:04:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GIRB66yypPPrKrwEsR87//zR2i3jDtWRs1HuHZDcrWg=; b=Qb027waV4mbmfuORIRqAGvEgCBvkYqTvd3A38adXSokl7radPDN4ZoGtxoX4pT4RXV SdsC99+ZyJjfo3fwWxReSHeuD23zpAqolN99TK1bMYiWbjx7xUVAWk0+lPzkgUh37ojO zJ7GfIQEAHk3m7uwQCX0a9QLxKdsOt2LV0JdphsNFWWcJ0NjgAgJTRKIdB/rB3N5EHWs mytcqldg8aUCBhx9r1fDNQ9SYIdT99TNChg53KjKX39SFkOFoU3pp8iSveA+sPa/77yL RgNfZkCRD498XYck/5nwI6mYA8ZoJ1FmlPpqCmV72jn6tYpBd+R3Cn8FX83EezVZ6gI3 0/KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=GIRB66yypPPrKrwEsR87//zR2i3jDtWRs1HuHZDcrWg=; b=DDiDLlpKepjio+JArGAvF5wKEuMs0Sq6KdOnTCWjb8E3rfVbN0rymQJWViCxBgZcvL Mltg7TIQ4KrA95No37p3hzoaDqP7qACQYktrx7zvhyqwOLWIAvD7OvdY5JOBHG48g+4f w1aQ2e95ZeKNFMzCQfcEfWV/sLjzhJrAEyaRgnz7SHaYRG/iEH2FxrOAfPqtG9i8dUYj Xgv2iZGHyHjOHtyIIKmdjbUdInck5VpwIyZTUCtjLWSHpYuvlxoj81FjTt68g2BgFodn HcQxML9Un7hyGDr5J4lQWTOUEdot0iNKSo4zmUGqpsRPp6Ma9q85/+rx540Gg7GZxmxc +eyw== X-Gm-Message-State: AOAM533gUrthwv9Yp5+vQ/X9x9/oWHZVGPdF30M8Hmlw5BYGKnv/Wp8R TaGaIxPsfHgAOUbIdK9xiSU= X-Google-Smtp-Source: ABdhPJzga44jJ38Mi7jDzm22dZ+3rQE4TCaz9skhBBO1E6Tj/g8xPcrfw5k6G3O5wCnql6RPVXwcIg== X-Received: by 2002:a1c:238c:: with SMTP id j134mr4451644wmj.5.1639832698527; Sat, 18 Dec 2021 05:04:58 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Richard Henderson , Eduardo Habkost , qemu-trivial@nongnu.org, Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 4/5] hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter Date: Sat, 18 Dec 2021 14:04:36 +0100 Message-Id: <20211218130437.1516929-5-f4bug@amsat.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211218130437.1516929-1-f4bug@amsat.org> References: <20211218130437.1516929-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1639832702056100001 @pin is an input where we connect a device output. Rename it @input_pin to simplify the documentation. Reviewed-by: Yanan Wang Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/qdev-core.h | 6 +++--- hw/core/gpio.c | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 424c48daf6e..d19c9417520 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -476,7 +476,7 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const= char *name, int n); * qdev_connect_gpio_out: Connect one of a device's anonymous output GPIO = lines * @dev: Device whose GPIO to connect * @n: Number of the anonymous output GPIO line (which must be in range) - * @pin: qemu_irq to connect the output line to + * @input_pin: qemu_irq to connect the output line to * * This function connects an anonymous output GPIO line on a device * up to an arbitrary qemu_irq, so that when the device asserts that @@ -509,7 +509,7 @@ void qdev_connect_gpio_out(DeviceState *dev, int n, qem= u_irq pin); * @dev: Device whose GPIO to connect * @name: Name of the output GPIO array * @n: Number of the anonymous output GPIO line (which must be in range) - * @pin: qemu_irq to connect the output line to + * @input_pin: qemu_irq to connect the output line to * * This function connects an anonymous output GPIO line on a device * up to an arbitrary qemu_irq, so that when the device asserts that @@ -530,7 +530,7 @@ void qdev_connect_gpio_out(DeviceState *dev, int n, qem= u_irq pin); * For anonymous output GPIO lines, use qdev_connect_gpio_out(). */ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, - qemu_irq pin); + qemu_irq input_pin); =20 /** * qdev_get_gpio_out_connector: Get the qemu_irq connected to an output GP= IO diff --git a/hw/core/gpio.c b/hw/core/gpio.c index 8e6b4f5edf3..80d07a6ec99 100644 --- a/hw/core/gpio.c +++ b/hw/core/gpio.c @@ -115,17 +115,18 @@ qemu_irq qdev_get_gpio_in(DeviceState *dev, int n) } =20 void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, - qemu_irq pin) + qemu_irq input_pin) { char *propname =3D g_strdup_printf("%s[%d]", name ? name : "unnamed-gpio-out", n); - if (pin && !OBJECT(pin)->parent) { + if (input_pin && !OBJECT(input_pin)->parent) { /* We need a name for object_property_set_link to work */ object_property_add_child(container_get(qdev_get_machine(), "/unattached"), - "non-qdev-gpio[*]", OBJECT(pin)); + "non-qdev-gpio[*]", OBJECT(input_pin)); } - object_property_set_link(OBJECT(dev), propname, OBJECT(pin), &error_ab= ort); + object_property_set_link(OBJECT(dev), propname, + OBJECT(input_pin), &error_abort); g_free(propname); } =20 @@ -165,9 +166,9 @@ qemu_irq qdev_intercept_gpio_out(DeviceState *dev, qemu= _irq icpt, return disconnected; } =20 -void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq pin) +void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq input_pin) { - qdev_connect_gpio_out_named(dev, NULL, n, pin); + qdev_connect_gpio_out_named(dev, NULL, n, input_pin); } =20 void qdev_pass_gpios(DeviceState *dev, DeviceState *container, --=20 2.33.1