From patchwork Fri Nov 5 17:21:25 2021 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: 12605157 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6887C433F5 for ; Fri, 5 Nov 2021 17:26:40 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8F7866124A for ; Fri, 5 Nov 2021 17:26:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8F7866124A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:50174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mj2z9-0000Dm-Jm for qemu-devel@archiver.kernel.org; Fri, 05 Nov 2021 13:26:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj2ug-0002Vv-Bh; Fri, 05 Nov 2021 13:22:03 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46933) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mj2uZ-0007DH-FH; Fri, 05 Nov 2021 13:22:01 -0400 Received: by mail-wr1-x42a.google.com with SMTP id u1so14780426wru.13; Fri, 05 Nov 2021 10:21:35 -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=M4tUVFyTwsBpPus8Ws6Q3DkODj8qmKKgDnVTjeUyrEdf3NF5KriJ4/WCJMFC+lsoDd ehXIv0ABSAy8PvCnc1YFAe1T/pO5uOR7dAIaBeR+HowqLLwav/S12wGLJ5kmGRuieYWJ CAs1waDI4gmUKKJUTzB4jWYIhOdmTIt24IHcs2w7wQ/Tj3JcQcs+uJXXhXIAx51Rs6+Z 99mM1KuJLb/FdIu5UiKF8cLWBOPqavfAlAUAxLwFeJNRDCP5nopczt3luZbATTZWHW0A LFrhc/sKWI6LrOuOVO5PqHHbZa0je5XwwLQ4+ITTEHySOMTHm18JImFDQJwsvWf0xeCY Vmjg== X-Gm-Message-State: AOAM532DmVVQ6kxolzcSI2TWbgoIZ6mQYsOutCHRtYWZNHSShDpfJWqW TwbX72CjtIB0Czfk2ZSSk5nHzSNGu9A= 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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org 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 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Peter Maydell , Eduardo Habkost , qemu-trivial@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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é --- 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, qemu_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); From patchwork Fri Nov 5 17:21:26 2021 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: 12605151 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE554C433FE for ; Fri, 5 Nov 2021 17:24:40 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 49E7B6124D for ; Fri, 5 Nov 2021 17:24:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 49E7B6124D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:45456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mj2xD-0005KU-9S for qemu-devel@archiver.kernel.org; Fri, 05 Nov 2021 13:24:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj2uY-0002TX-4R; Fri, 05 Nov 2021 13:22:00 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:52200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mj2uO-0007Dd-1K; Fri, 05 Nov 2021 13:21:48 -0400 Received: by mail-wm1-x334.google.com with SMTP id z200so7651192wmc.1; Fri, 05 Nov 2021 10:21:40 -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=SFTVU0lTBKyRXbGy2CS5t+AvhvHLIdy+hZlhU3CfNh4Gax+ViMMJ5aiN9VJT2r0rYx lrjBSpqLfn3NpXt49XS7/RmX6iTbKp0caEMMHDXU0obpnphfSBF+/NWsMtaT1iQ6SuXK Mha4KFA9YfTxs9z4BDemONSfH41vc5kizz37MhdaonZ5KSZAXMvl75sN1khEZOzRCFw6 Jr2x3YpyNeYgRmSytb82K2Ou5DVi73oTYIMKR7ayMRWMyYfEuctCM8VS4JgMB1qWCynI F8FhmvcjR+onv15QyZV5nGGgOvl7k2++n+a94IsTDPnqgCW+O5wxX6cM1se5QKnZwsw2 nNEg== X-Gm-Message-State: AOAM5328inkHvtKwMXb9eygb/LST2hIYh9EnR947OKpgwaSVWHxuVhKz J+Rjnwte8fw7FMJP+f+RaU+nfJ1A6J8= 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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org 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 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x334.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Peter Maydell , Eduardo Habkost , qemu-trivial@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" @pin is an input where we connect a device output. Rename it @input_pin to simplify the documentation. Signed-off-by: Philippe Mathieu-Daudé 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, const 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, qemu_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 GPIO * @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) } void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, - qemu_irq pin) + qemu_irq input_pin) { char *propname = 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_abort); + object_property_set_link(OBJECT(dev), propname, + OBJECT(input_pin), &error_abort); g_free(propname); } @@ -165,9 +166,9 @@ qemu_irq qdev_intercept_gpio_out(DeviceState *dev, qemu_irq icpt, return disconnected; } -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); } void qdev_pass_gpios(DeviceState *dev, DeviceState *container, From patchwork Fri Nov 5 17:21:27 2021 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: 12605155 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AC1DC433F5 for ; Fri, 5 Nov 2021 17:26:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 43EB96124A for ; Fri, 5 Nov 2021 17:26:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 43EB96124A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:49648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mj2yl-0008Hi-VB for qemu-devel@archiver.kernel.org; Fri, 05 Nov 2021 13:26:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj2ue-0002Te-Nk; Fri, 05 Nov 2021 13:22:00 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:42987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mj2uV-0007EU-Fi; Fri, 05 Nov 2021 13:21:55 -0400 Received: by mail-wm1-x32e.google.com with SMTP id d72-20020a1c1d4b000000b00331140f3dc8so6934159wmd.1; Fri, 05 Nov 2021 10:21:45 -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=ZMls6nbXNUxBvNPh9s8PCu0WDzqZBhBIetlhkqmI0B7Ct1bUpHaQpXdlbDZqqSjv/n VIft7PFNCbQcdKpTsRMYlWh+fnnlM214Y2BJ2h1uUaO2Av4qiNrbzqKOd591H8+6i25k YrhxAw0gCePpclJtAjf6J7/LKHLnuvD/sGJlX0QsZ53maFWxQfJN00ZcgulqUGF7t2xV 6uv5pqkT2FDxxA+QqWaIzZqFTfEvfriYCPpg+nUkWiVTHTmSbKg0f7fEZF0ru+5g/yA0 DKfRaqB7sUMuwiTW938j/bya4jm/ajZ/TPUZpPZdIBzrYCrWCTyQgMWqr890ECSY+ZqZ lGMQ== X-Gm-Message-State: AOAM531chUqbjoVbE2BqIpJ8kn+Ya0tdqKJMkbzRR3y9Q4SQAQafyhEF LauYMZWhOmADAgKtaz1hhWUYc6HMxBQ= 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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org 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 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Peter Maydell , Eduardo Habkost , qemu-trivial@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" '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é 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); #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 create_fdctrl, bool no_vmport) port92 = isa_create_simple(isa_bus, TYPE_PORT92); a20_line = 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); } -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); } static const VMStateDescription vmstate_kbd_isa = {