From nobody Sun May 19 15:05:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.45 as permitted sender) client-ip=209.85.221.45; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f45.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1636132895; cv=none; d=zohomail.com; s=zohoarc; b=iHlkbjL6RRI/Yft67fyMU1D8T8eAMp3Qa1FIKg0nCt10Dm+AKGI5w5cb0XK0TITmoirsj8uGztAfoSnEIbXtP957Ug23u8c5Zr7lZGl4IbRuNXYpzKFS0UxUs6gaIIKChgrldQJ1J73DvpkFCEMa0xmxRAzxOEeCpj/3eiaKEl0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636132895; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=d3pfBfUWEkr1HXpj/BC7XFNX+5ez4tvt7AfZVzlC78A=; b=BaibsRXbzAu6dCxLKUgYgh24PG13tPbLYOiLQpY9MxBcV9OUNoOh88XCT0DcenrrHxvBq6whZ+BXp1xeLdBpuXP4mCsqdX30hOA02ykEiMo6JwO6m9jPk/5h+WfFLc0c0FCjHAyl1z1CcDieUExgSJJI71XG4ZS5dLyWGNGd3lE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.zohomail.com with SMTPS id 1636132895947725.875645370462; Fri, 5 Nov 2021 10:21:35 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id d27so14821539wrb.6 for ; Fri, 05 Nov 2021 10:21:35 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (62.red-83-57-168.dynamicip.rima-tde.net. [83.57.168.62]) by smtp.gmail.com with ESMTPSA id m125sm11628641wmm.39.2021.11.05.10.21.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 10:21:33 -0700 (PDT) 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=d3pfBfUWEkr1HXpj/BC7XFNX+5ez4tvt7AfZVzlC78A=; b=KxSOfKAtNVnLsGosZ5y8Vw1xxDNdMoLRzrJB5mLO3F6iAb8SSNUV0ZbpexiCav7Mkn jQoPwJP0KzHa4AN8GfQhNRiskX0ncuVUx8M6xWzs4Yf2FOatyu4H7YlKVJtsHMwdbV0K dK1U/hVJrPDt7XuPE9fk14ewmNrxD+amLQEuYHafH2una/oA0ns4HBrxdAWr7UDQIJol juXpMU1V2U2aY0aaewV7zmE0s7eIrg+rNY5ETGvGswejxpapiI1Zw3Xq8Eup1ucJGUMs 9J4OWPoW+bbbA0WBx7HHOWRsJhXBKFsZrbn2WbvpqKho029yRfDC7bDc2AfoGA3G/FJc Piqg== 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=d3pfBfUWEkr1HXpj/BC7XFNX+5ez4tvt7AfZVzlC78A=; b=yMqoeJrixPnIYBevvx0OkTjG/d81bkA+1dvEOh7TI9tuHdksMz9AmxH4vknIaeP7Q6 nFdvuMCnmq/bmHNG2pisvzWI/rTKISNcDvGRrPt2eVU6GHLmBTiVn2R9yiUeZmSqah72 5INHieZDTYEtSMLCormXTaQ+PB5+4PCVlomd2oD0RcCZqgrdB1PCH12ZPW3wz5QD0jpp w9pmvKTud5TbwqoLrJVWVIBflqNx7i7GglW2+AgG3MNAA64rmfyRlnpPO3S077TJBNFH FJ/9DVIrpADb5VSekWcCYdi0BBulKdIECSiYxVSmGrItFYkJq7nhi2msuSRdcU/XNyK/ +CeA== X-Gm-Message-State: AOAM531kxu9mel/A5gL1N9uEMxmITxIfRFSJsDsCjz5Bo2Nw5O2jURU8 WYh/3QSgKOygrryVo1tDWUU= X-Google-Smtp-Source: ABdhPJxSRofpgzzyLJ/LHocsl6qYthoyntcVE4dyjS02VB4BG3qNEhRDqBzJon9IMtgQzBDT7wMiqw== X-Received: by 2002:adf:f990:: with SMTP id f16mr68147221wrr.128.1636132894197; Fri, 05 Nov 2021 10:21:34 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Eduardo Habkost , qemu-trivial@nongnu.org, Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/3] hw/qdev: Correct qdev_connect_gpio_out_named() documentation Date: Fri, 5 Nov 2021 18:21:25 +0100 Message-Id: <20211105172127.224462-2-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211105172127.224462-1-f4bug@amsat.org> References: <20211105172127.224462-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: 1636132896551100001 qdev_connect_gpio_out_named() is described as qdev_connect_gpio_out(), and referring to itself in an endless loop, which is confusing. Fix. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/qdev-core.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 72622bd3370..5b88c8b9dd3 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -497,7 +497,8 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const= char *name, int n); */ void qdev_connect_gpio_out(DeviceState *dev, int n, qemu_irq pin); /** - * qdev_connect_gpio_out: Connect one of a device's anonymous output GPIO = lines + * qdev_connect_gpio_out_named: Connect one of a device's named output + * GPIO lines * @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) @@ -518,8 +519,6 @@ void qdev_connect_gpio_out(DeviceState *dev, int n, qem= u_irq pin); * It is not valid to try to connect one outbound GPIO to multiple * qemu_irqs at once, or to connect multiple outbound GPIOs to the * same qemu_irq; see qdev_connect_gpio_out() for details. - * - * For named output GPIO lines, use qdev_connect_gpio_out_named(). */ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, qemu_irq pin); --=20 2.31.1 From nobody Sun May 19 15:05:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.48 as permitted sender) client-ip=209.85.128.48; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f48.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1636132900; cv=none; d=zohomail.com; s=zohoarc; b=FwZHUt/hwtalJ1Kef3cL3sXdqaHzKHEoubt1CddUyKxc0lUCd3U+05ityxk18syThePh5k6OraxW1wPkSjxnw8G5T0/1SrGvxKaTcI34tzrRs9VyYkXLHOM+as9Bxi+Ikyx7UzkdmJ+vQygTTbvbeHhFKjyjFRds7400xDiayqo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636132900; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kMH4rTDikXhJZKCos7ysG4oLdQBxpsKJK0cAf4O+2Mc=; b=fso0gr9AXg4UEdY1471ci1hki7kSJEV2aPD6p6PUrcTq0WEqq666hXiYCW4jXBipQ/eQhoPSCyZu+q3v84qIXnXf9zGF2JPha5rvb1gVanIDdiKsw6aQiCnNtYP2np4OcWyanaF/qfciAZ9PB9rsZT/vZisLKm9rv5m2+eDX3RI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.48 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.zohomail.com with SMTPS id 1636132900799379.2699038186212; Fri, 5 Nov 2021 10:21:40 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id b184-20020a1c1bc1000000b0033140bf8dd5so6906547wmb.5 for ; Fri, 05 Nov 2021 10:21:40 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (62.red-83-57-168.dynamicip.rima-tde.net. [83.57.168.62]) by smtp.gmail.com with ESMTPSA id o26sm11661262wmc.17.2021.11.05.10.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 10:21:38 -0700 (PDT) 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=kMH4rTDikXhJZKCos7ysG4oLdQBxpsKJK0cAf4O+2Mc=; b=NFWCwo7iM31vVhh2iyNK/IlBZtZFlAS2hv0kT88M/xEBw05IZ5zkcwuQEf9ESwsV9A k+lQoLZlTqBq3ZEGIZfntT8Cm/ac4o6KHLlwPqfOy7iQt8S3D6KszBw0G/Pq0i4UIBGu Ukm9ZAtIAMfKxKAxjmY48IoJvmpcNudd5+uLQgqfOej6dL9rNjGjXaRLLLGRJ9NkAVlQ vY18PF75xZM6u80Oz+BXa40nLqIUSkqF559UeGdJ9rv38Hj9zDa/X21tQJj75AW0Omki 1nOI85sWgbzmj6iExD+SDfv+8kePfk/fOApEJWdbalaFpccgPMK1nav28/T8C89iCoHs y89Q== 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=kMH4rTDikXhJZKCos7ysG4oLdQBxpsKJK0cAf4O+2Mc=; b=r1ToCByHSlP1OxetFFBRG+WIAsLJ3QWdksOrZF7DfAyquGCF0+1fh1kFK4OwBm1gtM xNOyg6HLiqeZhaQpCPk0x1JG52UHgQxRbqcXiYPHDCenVdnmW58RUj+0W7rFJNW5r2av 2brnB3JNiz+n+0dD1a1zd6PKA8W3xzN2nxqez/hraWdxk5VqSQH0kuaJ+5PuQJWnMk2d j5t0J10OZGTAKGUd6vPdkf5c6+m458jyyrMYG7yZEjqWVXcBadZTefcWx2KrKFzVIooA LdjWeBalBp/rhO3icA8dWhLFE4Apy5xIjEnBjGBL+X8k2OQjXfGTyD1AT4CJlVU19lKr Q3vw== X-Gm-Message-State: AOAM531b+Xj1rLaqfdyrZVXLnZkqtH14lq+POsndnt1z/Ojut6Aw97Rw T7f1tUKH2esEThiwpxrgTQec+C9sDnE= X-Google-Smtp-Source: ABdhPJwmmiMflzrZV3GcpCWTGmL5EN9FSF0gkk5YW/bTfouE1WUse5OP7XWXzoEHEOPpSIT06kejgg== X-Received: by 2002:a7b:c841:: with SMTP id c1mr32572419wml.80.1636132898997; Fri, 05 Nov 2021 10:21:38 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Eduardo Habkost , qemu-trivial@nongnu.org, Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/3] hw/qdev: Rename qdev_connect_gpio_out*() 'input_pin' parameter Date: Fri, 5 Nov 2021 18:21:26 +0100 Message-Id: <20211105172127.224462-3-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211105172127.224462-1-f4bug@amsat.org> References: <20211105172127.224462-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: 1636132901108100001 @pin is an input where we connect a device output. Rename it @input_pin to simplify the documentation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Yanan Wang --- include/hw/qdev-core.h | 8 ++++---- hw/core/gpio.c | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 5b88c8b9dd3..3a0fe643a73 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -470,7 +470,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 @@ -495,14 +495,14 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, con= st char *name, int n); * * For named output GPIO lines, use qdev_connect_gpio_out_named(). */ -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: Connect one of a device's named output * GPIO lines * @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 @@ -521,7 +521,7 @@ void qdev_connect_gpio_out(DeviceState *dev, int n, qem= u_irq pin); * same qemu_irq; see qdev_connect_gpio_out() for details. */ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, - qemu_irq pin); + qemu_irq input_pin); /** * qdev_get_gpio_out_connector: Get the qemu_irq connected to an output GP= IO * @dev: Device whose output GPIO we are interested in 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.31.1 From nobody Sun May 19 15:05:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.45 as permitted sender) client-ip=209.85.128.45; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f45.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1636132905; cv=none; d=zohomail.com; s=zohoarc; b=n7ONlxrfm81RXpwgT+v+8+dGeIKnHdNBhw9iGEqU7jowAymHLHu6EtqlgyWaZtzMt3mridPNxFqUBaVz9Y8r4B2+5TLIodeyC/+rcfOLlutZ5FB94rRyq7tR3jH2DRw3mhvsOISyfxCWrotodY9v5hTH2WmPrca/KY9rX7GhLwQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636132905; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IOdSvE7B+V3yJN993wQb7M8J5BQsaGVtUf2KFSGPdGo=; b=KJLXGt5IFSQircg2I9/Arr+jW3FGXltvUVrREcUrGo4y8o6ZezNEA7Dtd5fIUvUyJQfovRy5/vYuEaw9E1a+wy483skHSA8Kx+JftN7vdM8wZ++nQl9UxTs37hoMzxmVtySB8nP0/JUBSDZVWPh8VK+wSgS6Bua10AxHIMNaCJo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.45 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mx.zohomail.com with SMTPS id 1636132905527611.0487186969465; Fri, 5 Nov 2021 10:21:45 -0700 (PDT) Received: by mail-wm1-f45.google.com with SMTP id 67-20020a1c1946000000b0030d4c90fa87so6929412wmz.2 for ; Fri, 05 Nov 2021 10:21:44 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (62.red-83-57-168.dynamicip.rima-tde.net. [83.57.168.62]) by smtp.gmail.com with ESMTPSA id a4sm7648091wmg.10.2021.11.05.10.21.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 10:21:43 -0700 (PDT) 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=IOdSvE7B+V3yJN993wQb7M8J5BQsaGVtUf2KFSGPdGo=; b=A1eqCaDugkUYsUbS/i+GBK6GjR0EuLjgxR+xu2r17EbgaGhEAINocCh4Q6n07C2tDy 9HPvEAZ38wFpB1MNkdGu0FmZam7q/EnRWnSncJo+/m2RJIvxiMt9R0tmVweGZ7ztj8GL 6BuJu2akeUESKGOmKBm2R15EGP2EnJehKtTgxC4jSrVMvRdXF/5Era73LSA8QvlBa2iT rfnZwO4BFU8hsdo6NNv2RqM5vfLtQraPbUqtjr6ww172kRatsohVF7axXUPAak/SRNnF iPVySQBoJto/BnkWaP+Vc1Y+3LQW+OMWOb8d2EtEQH/aMsgxMk53z3ZZZVTwCcXAhC6W 3Qqg== 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=IOdSvE7B+V3yJN993wQb7M8J5BQsaGVtUf2KFSGPdGo=; b=FKUDb9uXLQV7IqlfRBg1nLFv6KMFD4ne4fMiHo3pWLLFklry4vdu3TrspZHdZWdNsy h7403NDegzBmF03AKnmzZ7NQVO46zMKEpVmEiwDGX2976OYynniZtyoWib3DyPX2TMJR Q4oqLug93VxKsFZOrm27AK05te7awT6flzcuXrsRXQZven6kgAPUjE83r5iTqJQ8++v0 UPZYzFBrVnI1FPnUTGgF0hPdkOyD5qIh6NVtShprISFjcLz6ISyPXHbTBYoUG1MsWJM8 Lqh3CfR9RFXS/IS6BqbaJHUicm+k4Lz5I/WFqm/hhtMskgITM09jxDzzv0x/6vDmIaxr yiqg== X-Gm-Message-State: AOAM53186Uyl64Na+rH3QzIfmtILBRWGFffU5YsR1HFVS3UCHqxz1NET ZOAizcNwAcsz66XjQTU5gbg= X-Google-Smtp-Source: ABdhPJydUANBy2qlKlDDoncrwZW9FQohQBIjND9xVC++HE8vbZd3xtzzN55+t2dEWXzBiMRApzgpMg== X-Received: by 2002:a05:600c:511c:: with SMTP id o28mr33057350wms.96.1636132903802; Fri, 05 Nov 2021 10:21:43 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Eduardo Habkost , qemu-trivial@nongnu.org, Richard Henderson , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/3] hw/input/pckbd: Rename i8042_setup_a20_line() and its a20 irq argument Date: Fri, 5 Nov 2021 18:21:27 +0100 Message-Id: <20211105172127.224462-4-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211105172127.224462-1-f4bug@amsat.org> References: <20211105172127.224462-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: 1636132907676100001 'a20_out' is an input IRQ, rename it as 'a20_input'. i8042_setup_a20_line() doesn't take a Device parameter but an ISADevice one. Rename it as i8042_isa_*() to make it explicit. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Yanan Wang --- include/hw/input/i8042.h | 2 +- hw/i386/pc.c | 2 +- hw/input/pckbd.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hw/input/i8042.h b/include/hw/input/i8042.h index 1d90432daef..3534fcc4b43 100644 --- a/include/hw/input/i8042.h +++ b/include/hw/input/i8042.h @@ -21,6 +21,6 @@ void i8042_mm_init(qemu_irq kbd_irq, qemu_irq mouse_irq, MemoryRegion *region, ram_addr_t size, hwaddr mask); void i8042_isa_mouse_fake_event(ISAKBDState *isa); -void i8042_setup_a20_line(ISADevice *dev, qemu_irq a20_out); +void i8042_isa_setup_a20_line(ISADevice *dev, qemu_irq a20_input); =20 #endif /* HW_INPUT_I8042_H */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2592a821486..06ef74ca22b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1043,7 +1043,7 @@ static void pc_superio_init(ISABus *isa_bus, bool cre= ate_fdctrl, bool no_vmport) port92 =3D isa_create_simple(isa_bus, TYPE_PORT92); =20 a20_line =3D qemu_allocate_irqs(handle_a20_line_change, first_cpu, 2); - i8042_setup_a20_line(i8042, a20_line[0]); + i8042_isa_setup_a20_line(i8042, a20_line[0]); qdev_connect_gpio_out_named(DEVICE(port92), PORT92_A20_LINE, 0, a20_line[1]); g_free(a20_line); diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index baba62f357a..7b842c8f3b5 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -680,9 +680,9 @@ void i8042_isa_mouse_fake_event(ISAKBDState *isa) ps2_mouse_fake_event(s->mouse); } =20 -void i8042_setup_a20_line(ISADevice *dev, qemu_irq a20_out) +void i8042_isa_setup_a20_line(ISADevice *dev, qemu_irq a20_input) { - qdev_connect_gpio_out_named(DEVICE(dev), I8042_A20_LINE, 0, a20_out); + qdev_connect_gpio_out_named(DEVICE(dev), I8042_A20_LINE, 0, a20_input); } =20 static const VMStateDescription vmstate_kbd_isa =3D { --=20 2.31.1