Message ID | 20240905041732.2034348-4-dmitry.torokhov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E182CD4F56 for <linux-arm-kernel@archiver.kernel.org>; Thu, 5 Sep 2024 04:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kOurL+niKTuTYRrWkCUZcFZDU3uO6ZkmtonuLPtkVjM=; b=e1EvjotY9N3yLc0FA/SJ8GzUPc cS7I8WKFsuHDTr2Um0nQwvYFk+ST1MrAf+Zgd1HntPCwYuedSGwV1TUaDbYoqID/aucFsFryIiMId Anl5ceQY7Kcm7wlDM+0KF3kGgBkVzix9m9F/8dEhPQukR/xW4Cw5F4lxv9gsR3IoxLvyfoF8zr+/5 E+uk8JYs1wxNQA40Tb9RMiA6A8A5erM6srJ4GMMM0xBoirBacpEVBD9sUSrsw6zglp9CJxV6o8JfT aN8IinkUtFQOqcYadNeDFwQrWwR3Ys/HenduZKLUQ617FpTBiPae1rQWDHKWeYHv5kWmH28nxGxaz m3yOxjVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm402-00000006uUr-2tZ6; Thu, 05 Sep 2024 04:21:38 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sm3wL-00000006tLl-2slJ for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 04:17:51 +0000 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-709339c91f9so242588a34.0 for <linux-arm-kernel@lists.infradead.org>; Wed, 04 Sep 2024 21:17:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725509868; x=1726114668; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kOurL+niKTuTYRrWkCUZcFZDU3uO6ZkmtonuLPtkVjM=; b=juj+dE77i4YnyBRc+GNj+dLVQlMdLpIbwDfeTWqSsOo+Wr/bZGpYhM8ZRXKbcJYb5P XcCPrQVeCRlrs5B9ROwpqbMEbs88UWG+CXN8jtsKIc97urlHRMoNgCpuIs+U+0BbiRIL hP97aH1V5rKhrpW7G980WNn62Kl/7Z9WgNV01xyRr8Hi3WzEqMQ0+Wlcn+f+gYCLmnPO 7yS3a2iQ88aeOZyeF/0+X4zm2MXM3CAw1FEBXBvxXxq2Xw08uNADS9MG40sYUxool0vr Ox8cUmI8dPbVj3v6g+TYylrUCrhJWDTNqRGqChhkJqlBCpkYSpRod+DH8PrYFgNj0CKv Is3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725509868; x=1726114668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kOurL+niKTuTYRrWkCUZcFZDU3uO6ZkmtonuLPtkVjM=; b=XZqUlBOKKZj/eKD0zV1Gi72WAjAYjnoxKfjyLv3S0ar7R170NHsf+iNYr5ocliPJC1 176J1RSc2kBfRFCDLQ8W044tOS7Vj9u+266QcFXIBOFOCtSjI/QJv0VxZo8BKmdbvLWi xYUSN6LDJJdzjhL7J9kleCfPW2V2e9w1bJE6axMlGCT+kLqaQw1LHl2SUhSTuakXRETO +xE9Kgq40lATeQWXJ6L+XlPPfcKsgHXjrsogHji6agZowkgAAFGFSBIOx1sUxeZWbU/N xEmX4cpLWE5k5+EpA9OASGsCD1EjEj4o+K5WBlZ8JWCRRfj/dGvg8Logn8R/l0yq4pSp S50w== X-Forwarded-Encrypted: i=1; AJvYcCVLzIuVdAJuJsXVeKfFkYFizPGVbNO8yGLadwwMVhhhr4dUTfUzDhIdCD/Iw6BX+WRb5sr/2y7TaK+Zcc6vvhvK@lists.infradead.org X-Gm-Message-State: AOJu0YwUd2dF1vpQ5xlJSMDrYuB/IhGdnJg4yziRj8omCpGsCrsXg/fe nM+zwX2Im5peSRsyZ8bar5RDbg0FabfjHBxVy3DJ6zUoyO93ksDj X-Google-Smtp-Source: AGHT+IGv36a3rXrN6zFd3TS7W1uho2zPf6Uqpg1TIUhSE/xaGckBL/aTYfQZ78HZQTFPboprAViM+w== X-Received: by 2002:a05:6830:268f:b0:70a:948c:6b3f with SMTP id 46e09a7af769-710aada57c6mr9102268a34.12.1725509868353; Wed, 04 Sep 2024 21:17:48 -0700 (PDT) Received: from dtor-ws.sjc.corp.google.com ([2620:15c:9d:2:13bd:b4e:4c0f:4c37]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d4fbd8d52esm2450216a12.32.2024.09.04.21.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 21:17:47 -0700 (PDT) From: Dmitry Torokhov <dmitry.torokhov@gmail.com> To: linux-input@vger.kernel.org Cc: =?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>, Helge Deller <deller@gmx.de>, "K. Y. Srinivasan" <kys@microsoft.com>, Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>, Samuel Holland <samuel@sholland.org>, Lyude Paul <thatslyude@gmail.com>, Michal Simek <michal.simek@amd.com>, Hans de Goede <hdegoede@redhat.com>, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH 03/24] Input: alps - use guard notation when pausing serio port Date: Wed, 4 Sep 2024 21:17:08 -0700 Message-ID: <20240905041732.2034348-4-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-goog In-Reply-To: <20240905041732.2034348-1-dmitry.torokhov@gmail.com> References: <20240905041732.2034348-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_211749_745723_6771A3A1 X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Convert serio-related drivers to use new cleanup facilities
|
expand
|
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 4e37fc3f1a9e..0728b5c08f02 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -1585,7 +1585,7 @@ static void alps_flush_packet(struct timer_list *t) struct alps_data *priv = from_timer(priv, t, timer); struct psmouse *psmouse = priv->psmouse; - serio_pause_rx(psmouse->ps2dev.serio); + guard(serio_pause_rx)(psmouse->ps2dev.serio); if (psmouse->pktcnt == psmouse->pktsize) { @@ -1605,8 +1605,6 @@ static void alps_flush_packet(struct timer_list *t) } psmouse->pktcnt = 0; } - - serio_continue_rx(psmouse->ps2dev.serio); } static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
Using guard notation makes the code more compact and error handling more robust by ensuring that serio ports are resumed in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> --- drivers/input/mouse/alps.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)