From nobody Tue Feb 10 02:01:16 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1621078672; cv=none; d=zohomail.com; s=zohoarc; b=M3mTt8XuXKAn+orzl412d8QcI3Dzcfr2EC67bN2+Tws9iQzNtm6aCcg2LLGjVX3UcVkGO4MmVhgOfx5755oKVsh3/J1i90QH50Uxh3xD8E3Pg4OBMdDvhzSJ5/D5v9O5sxtAPjSAuYwOxYYbU3sNEHLRIy8EuCjuodFDKcLEDx4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621078672; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=m52FkcA+BfAR8CwKhOnbifgUfcRgB/9EQNE+1wmhwes=; b=heM8J4BEPMuwDRBjgIwli1OhHGVduYRdbZOpu7zT0mVA3oBnDIUzUR4oykeut2IQNjgkwlKXr9V/tCDTjJRfNSRySwOxXLw4siSrY99DtbJ76dDoXVBF9IsZ6/TjXBGjzJHtTvZduBXU3J/jod34Sf6Uvy8Eb1D9z5KWMVMw1I4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621078672855247.62653006517553; Sat, 15 May 2021 04:37:52 -0700 (PDT) Received: from localhost ([::1]:56030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhscB-0007yk-QD for importer@patchew.org; Sat, 15 May 2021 07:37:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhsXb-0003Rg-4z for qemu-devel@nongnu.org; Sat, 15 May 2021 07:33:07 -0400 Received: from mailout12.t-online.de ([194.25.134.22]:47762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhsXY-0003GS-Of for qemu-devel@nongnu.org; Sat, 15 May 2021 07:33:06 -0400 Received: from fwd39.aul.t-online.de (fwd39.aul.t-online.de [172.20.27.138]) by mailout12.t-online.de (Postfix) with SMTP id 34DA55D235; Sat, 15 May 2021 13:33:02 +0200 (CEST) Received: from linpower.localnet (XZZDzuZDghvnecW356e8qedTJZUM5w1vEPVnwDnGgrjpPFipGTzjz6wA+smHHocZp1@[79.208.18.63]) by fwd39.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1lhsXU-0RXdiK0; Sat, 15 May 2021 13:33:00 +0200 Received: by linpower.localnet (Postfix, from userid 1000) id A60BF200620; Sat, 15 May 2021 13:32:54 +0200 (CEST) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 03/11] ps2: don't deassert irq twice if queue is empty Date: Sat, 15 May 2021 13:32:46 +0200 Message-Id: <20210515113254.6245-3-vr_qemu@t-online.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ID: XZZDzuZDghvnecW356e8qedTJZUM5w1vEPVnwDnGgrjpPFipGTzjz6wA+smHHocZp1 X-TOI-EXPURGATEID: 150726::1621078380-00003E8E-50EA5928/0/0 CLEAN NORMAL X-TOI-MSGID: 3b974682-be1d-4446-8147-0a8827e9ee05 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=194.25.134.22; envelope-from=volker.ruemelin@t-online.de; helo=mailout12.t-online.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Don't deassert the irq twice if the queue is empty. While the second deassertion doesn't do any harm, it's unnecessary. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Volker R=C3=BCmelin --- hw/input/ps2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 55a81a0c51..4aee46a595 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -519,7 +519,9 @@ uint32_t ps2_read_data(PS2State *s) /* reading deasserts IRQ */ s->update_irq(s->update_arg, 0); /* reassert IRQs if data left */ - s->update_irq(s->update_arg, q->count !=3D 0); + if (q->count) { + s->update_irq(s->update_arg, 1); + } } return val; } --=20 2.26.2