From nobody Tue Sep 9 06:58:07 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1640954896; cv=none; d=zohomail.com; s=zohoarc; b=lbE2lRkAnZrc6ty3hLAtQAKQZfT+2oDyfTRRJVqlt6W5pcKd43sNBFbPqf6p1HCyjh/2jycWRztPzSPlGaJ9DHGoxMZSjPtJmHRBfmleMRon7EI9pC4VbXSNZDTS4MA74WYSLZSbbUVMmClPBFd04lQy+D7a+tEyF0CL3k6BM5k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640954896; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=uQrjre6Db1sZNkT4sskEN8IBgNsCcPmlEpkvvQNs6e4=; b=YCK3LieR9GmR4IsCuw3nFWx8ZJz3K5vW1aZqH1utNHll9xdtR5u66EqNplaLKDdCE5tuww3SymdPOHL2tvIggLLdSu4CNt4GXFdCQjUYitDF/y/9FFo9N14cNLBL+5THWk+fKAfHsEF++y5hUwA7hqPKWnY8+oKxjiZFgw+AM+c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1640954896906780.9850931583983; Fri, 31 Dec 2021 04:48:16 -0800 (PST) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-7-xP0t0e2LPA-NQpIVRLWe9g-1; Fri, 31 Dec 2021 07:48:14 -0500 Received: by mail-wr1-f70.google.com with SMTP id t30-20020adfa2de000000b001a24004e1fbso7514530wra.10 for ; Fri, 31 Dec 2021 04:48:14 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (26.red-83-50-86.dynamicip.rima-tde.net. [83.50.86.26]) by smtp.gmail.com with ESMTPSA id g6sm27436067wri.67.2021.12.31.04.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 04:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640954896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uQrjre6Db1sZNkT4sskEN8IBgNsCcPmlEpkvvQNs6e4=; b=JZO+Wzo5fvgLhBsdymW1W8HZjZoqw/hfiC9x46R3w50k1nYqBpNAzW0Key9dTNM+lcTdQG oSyy1g9drjCr4IwrZLY9EkC6QFITOwvvWDL1BQKUc3pkFlVaD+l+er8zq1Ps2aqvjoe9aB wQZRSX9xk84DexgcVKOGgU0aj1tu2u4= X-MC-Unique: xP0t0e2LPA-NQpIVRLWe9g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uQrjre6Db1sZNkT4sskEN8IBgNsCcPmlEpkvvQNs6e4=; b=V4vbtK1gSUr1cz4h65qOgU+Oh6oxCPAdrHMyKkTxTm++X2Jh3CoeSUb1hYpgA77rG6 8h2/4t4fPLmxLuushB3C1wR7tfF58os6ekvOfyfDE3J1JefLSuLIOfwdMP0zQW2y2wG/ qJ9BZHFm0/H0qIZuxhnOs0J2n7KcwGwLlMnaxGW8cvSwwn+HYmM9pCM+1DAoeSFUaUnT YC9DYKN8L1IVgErbxwdahcHxpzKuU7PRrx0kcXeQc5kRgJIJ/tnJZLRJIX5DJ28Nk0So hJzuI6D4pbJDSLjhN54CTxD4mwuKQwkZjk8el5L9bq0fXULJv5H9LM6rz6sytK9iRYv1 EqPQ== X-Gm-Message-State: AOAM5335aQwIfMThMcfSJZltGBx+n2drslW8dBUHtbpND+X2vFshvk1n LHZEgUTZnJCs7CzXb8BLRpUTZpqFlzhhytaMKWQTjIQSg36SXtTL6TfCExVmh3zeUjfPUZIYpMM +4ij2Esj3iS1W3A== X-Received: by 2002:a5d:488a:: with SMTP id g10mr15576223wrq.653.1640954893572; Fri, 31 Dec 2021 04:48:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzj64MCdxk3k9Hhr8hj4/AtZ9Fw4XMI0Tl40rrw40U5RcpByN32mz7ctTQDt60mIgKX5OMRdg== X-Received: by 2002:a5d:488a:: with SMTP id g10mr15576206wrq.653.1640954893349; Fri, 31 Dec 2021 04:48:13 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 04/20] hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter Date: Fri, 31 Dec 2021 13:47:38 +0100 Message-Id: <20211231124754.1005747-5-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211231124754.1005747-1-philmd@redhat.com> References: <20211231124754.1005747-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640954898068000001 From: Philippe Mathieu-Daud=C3=A9 @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 Message-Id: <20211218130437.1516929-5-f4bug@amsat.org> 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