Message ID | 20240202065608.14019-6-jirislaby@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-49320-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp250989dyc; Thu, 1 Feb 2024 22:57:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGl/nJfN4ejdCfGddz99i48VCHEcvMSQje7ZMhVJrZXsGY3sMOxVKw8oZBuez0VgdEz1GDk X-Received: by 2002:a0c:e3c9:0:b0:68c:5145:af08 with SMTP id e9-20020a0ce3c9000000b0068c5145af08mr882550qvl.63.1706857072428; Thu, 01 Feb 2024 22:57:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706857072; cv=pass; d=google.com; s=arc-20160816; b=zbdRD9UfpW2I6Cs8eTlNxyMFzauFc6esTbLQuSea9GmRyWExtk3q9hwKQtprqaErDr Q9p2ByAF2XJR/Y5Jp3MxdOEzgG90HPF5MJIUudUtUWK9ArJkvztfOizwki7bGOo2NQuW 6nZIYsl6YVFxX2x27DIrer/bWtKmZCACP9eAWYVUOaYujLT1zthl3KnUdOvY2UuLaWwZ /Lx+jmpbcz4X+eaygJnnA19lnw+5WK5pSFNwcHkEI34CS07dQJKxA9zIK+aZggpz1Iuo m8LDqlIIEnR5VrhbADNfAsX+6tvf1XA/ts8T+MMZHRFm45wZ4InD09BXSBuk3Xg1kPQL VMDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=KRez3QNtR6hTbw2CIzDtNmzj+CaHtDM2eYX/7H9xukI=; fh=GlCDwkW/zqMT0bBJjvTbYJQ78XWhTLJa2gHwPvi1Zf4=; b=kIXBbp4S6apLWScfDGsow6mPKyluz991Qg7qn9n8E2uCJHYvpovLVSzDhPmiqxB1NL LF/L5oqAjCVUMfc2L9mqTefUB9vpDvGshtpgamzzik8OS9eGPmzDAJxJynoZfKAQWO9Z 0mFMnMuj+lNRCZm6DObYdOmPb4yNHdv18t9Wn14EG6vkpq0xp9Yjqf8BveuUNwovZhjd JMq+uz0TNTCb/bBSCWvJAPxatKa+9ugqvnYcYUHmSbVawWBzJKy7gY1/mam60MA/0la3 fYfFRlXlilHRCjGUcgHF1BaNT/z2YHNMEBI6CfAO9kLHh6kLHmZSejccWU7AkrXdL8WK uBsw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RtuHRPU9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49320-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49320-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVXCireionWDbBgUaH4L2Ap83+9YXgWiEmygtbBgHkbvNl8o/xI85rPTq9ASfIIwAZcy2NXh39aFKCmov0GJsI6Wyj0KQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u13-20020a05620a454d00b00783f800eb25si1499008qkp.712.2024.02.01.22.57.52 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 22:57:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49320-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RtuHRPU9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49320-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49320-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3A76E1C23352 for <ouuuleilei@gmail.com>; Fri, 2 Feb 2024 06:57:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAAA218AF8; Fri, 2 Feb 2024 06:56:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RtuHRPU9" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F41C2182BD; Fri, 2 Feb 2024 06:56:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706856980; cv=none; b=qP1gvv5kbJDOyW1RBRFOYsHfPtxHw8mtVBB9RQxgxlSnKZI3DvhIpa9CPDqgTwuxO9J5rwTjJ1J1BGdYLF4s6GS7q0VKZjaI1EHkiey+Z+ECkDQ0nS2/7bXFPl6Or6ZtZv7UeK0+kheRM960cWun74vNP4Tz7AF9zCwR3RHEflg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706856980; c=relaxed/simple; bh=W9KFsqQrZI8Sz/TN7frGjMUlXkKEz2nE7bsFVKL5CyU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g+QLbkstyzDoORqmuZXG5JDS0cI8BPaxM4m/cGnrqhK5pnWGCQ4+u6qP1LiQoMNLtRgMr+QL7EKb80Oi/1IWYG7N6znulWXlXzGog5n1AiJ4Nn2+LnjL3QaPFEK4O52srViWCIGpDm/sOpVnb/J6iupUAkZbzzaNySbk1vOIeG0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RtuHRPU9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 756F3C43399; Fri, 2 Feb 2024 06:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706856979; bh=W9KFsqQrZI8Sz/TN7frGjMUlXkKEz2nE7bsFVKL5CyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RtuHRPU9FpzT5yDF2vq8XfXgP/0y1diDcLNimncLlu61PbNXz12OwQkqqyGuYZqxN O/JB61ox5ESoiHepTaoOFlYFhnlbcw1OrSn8stQ+cHPVM8P3c7XEzQIVtIbTU9Z7gZ YgEdY6P63TyIcrBjjgkg94/Iesy033j0dFXERwc0dZYLcD5H0H5F0dFNthvCPP5f3l KAarWoO7igBV/Css7i5QxQvTwaC/6cS3aev+yzbWQofvviEEKNDarQvxUA31EoJuUu HeTnnUXvFVrZ7Def5IuChkVqmJYvIk4bW/yKyS/W1N4oJbJ00o6RaQanX1ewpmY9lP rKp9+IvTbhF1A== From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Subject: [PATCH 05/22] tty: vt: remove unneeded assignment of EPecma to vc_priv Date: Fri, 2 Feb 2024 07:55:51 +0100 Message-ID: <20240202065608.14019-6-jirislaby@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240202065608.14019-1-jirislaby@kernel.org> References: <20240202065608.14019-1-jirislaby@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789769361699398763 X-GMAIL-MSGID: 1789769361699398763 |
Series |
tty: vt: cleanup ESC sequences handling
|
|
Commit Message
Jiri Slaby
Feb. 2, 2024, 6:55 a.m. UTC
vc_data::vc_priv is _always_ assigned before the ESgetpars case is
entered (in ESsquare). Therefore, there is no need to reset it when
leaving the ESgetpars case. Note the state is set to ESnormal few lines
above, so ESgetpars is entered only by the next CSI.
Therefore, this obfuscation can be removed.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
---
drivers/tty/vt/vt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index d04dbafc0517..69ebce0878f2 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -2421,10 +2421,9 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) } return; } - if (vc->vc_priv != EPecma) { - vc->vc_priv = EPecma; + if (vc->vc_priv != EPecma) return; - } + switch(c) { case 'G': case '`': if (vc->vc_par[0])