From patchwork Fri Feb 2 06:55:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 195657 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp254855dyc; Thu, 1 Feb 2024 23:06:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOHMFpX7NbPoc9jmMXtyINODOHhl+ZFOr6ApFMbB9pI1Fx9h50W6U6rH34Q/o8YUG/O71S X-Received: by 2002:a17:902:6803:b0:1d9:4ede:66c0 with SMTP id h3-20020a170902680300b001d94ede66c0mr1245543plk.40.1706857607395; Thu, 01 Feb 2024 23:06:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706857607; cv=pass; d=google.com; s=arc-20160816; b=ytNRJO2b8X6cX/LW4ETzf0q2bsDS+2J0Xf1KFIbDoFR++KI9cLamvt514mPIxMsudq ORsNtxcIEIRuSGN5ERq6aEiyzxeQS+RRMJUxmxLIYGlGCFY/ox/K3/pCA6GyacYuH3UJ m9UafRENvhWOFfj/FM4bS+se/ZC6wxtPat8IUJ6gBPX4H0dr5i68Op0ZKZoGZ0b/iqE5 Az1S2q7I1C+PQPNd+BF9yNm96/SsdPmPBDsHWGkiJLj8+YfeOW9QVFrbfcF3UPc2Ttka jjZAaGvGcaj7ADLzYpJauFi4fdLxiO0QmRZbdvToL60ll9NAzO12Fh5SGxZhQgPbZxnl 2Fcg== 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=+wm7txhPMUeGVXMnvt4NP2/5uzD6cPZl2D0h+CYwbEM=; fh=+zY/X9uDTWnrKHRUecqNZvH2Bpr4Pn0HTN470HgvRrg=; b=PMFa8vgEKOkTk2kc8vorRl/Pes9LFUJhQ76hfbpb6XDVKZ92uB1kic74X8NpevZhx2 iMc+hXT3sIqwPaixzmSIQfcGRWX3Pcn+U2B95jvic2DqUsWc8dcSPt1mN1KgEFnWTOlc smScM0ywpzWrt1YuGmPwKXI9CAMRDYhpCObXzVRNUWm/MAwhAIMIiGtsCnhxpiXVQ49k osmoSajhfFPHz0/mDN+x8vMjrLt1SIXjl735znNg3Ik8Je0htIy2VrWUAnkPsBSGzzBY RPqepgajEkG7ADpPLkdSqi4yQm7v6mtkeAdPCAX6k90F6dIsKISmmdTke72ctP13G2Gs zPzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jo2gf6ep; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49325-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49325-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWbZMFgwlq8wA6kGW9OUH9nMazXzmdI2uK9/OrrI41qm9ZO5dIOQJLx74NOk38V9reFyzRvhmUNYl/X2aZ9orWCu5tUug== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id g2-20020a170902c38200b001d927157e84si1151847plg.481.2024.02.01.23.06.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 23:06:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49325-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jo2gf6ep; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49325-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49325-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id EB5B3B25928 for ; Fri, 2 Feb 2024 06:59:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE0DD33CCA; Fri, 2 Feb 2024 06:56:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jo2gf6ep" 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 0B5081AAD7; Fri, 2 Feb 2024 06:56:25 +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=1706856986; cv=none; b=U+fexmCs01GQu2CmG4jvNrq76Ch5WQIf3s8vSG0MDmZ3PHAsGA81Q5x9lDyUfWhWbIsKS4udn0TS/zJ05pzd1ZyFnKT9hRjDJj7bB8u9IctU84PejC2+vbII0qOJxuSChPy+wmrX8XxhEVrtcKwost7WEAb08Q0H7ucX/eUe8M0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706856986; c=relaxed/simple; bh=k53CFJFMOZQDpOcxwZ7H0r8hlFfuSR0Pgv3cmw8obIM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LTHv36C795uX3gxPV3d+xwnGl9lBvl04RoMBLKX55rnDbtz4tGaOe1qw/UMNexLgBBH7BASZxc6bJAhPprX9umeIKeROnzBvoirS5SmcE3DAMm7mBQRAFkcfRJYktVHOZTkq4fqHcXklh/T1LysLS6dRkTPYyHrrchCUxBjRUOs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jo2gf6ep; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A63EC43601; Fri, 2 Feb 2024 06:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706856985; bh=k53CFJFMOZQDpOcxwZ7H0r8hlFfuSR0Pgv3cmw8obIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jo2gf6ep1g1L1uoWylXncKHKTwLanexUMlfY3+AlIwoZqrEz/pN5zORvJJe7ssrn3 2uaVFAbXJSht34Ho3DYxDgciSaPztclqo3+Xfez3pIVHjO6mBXjDY+lQHRoRZ23DoS Y/Bte72KDyBz7lBXDHP3ETGMlNDKxMVH6fhWnhtUa1T0ok6gcQuiBjK1zvgf9dEPrL zG0h/ScHc800hNOZ6DlbLGCUIg5L2U31339PA3MTDecfZJjy1ywIxpgINoGgxEeetY ZUXAlL5pNfD0ZheKPA8W//PCidyHAuPGd6xvVbQ/dqRvCOaYMVHyLskk7gQRDudzix 9PU3qZnvffTew== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 09/22] tty: vt: put cases on separate lines Date: Fri, 2 Feb 2024 07:55:55 +0100 Message-ID: <20240202065608.14019-10-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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789769922741814381 X-GMAIL-MSGID: 1789769922741814381 Some cases of the CSI switch are stuffed on one line. Put them all to a separate line as is dictated by the coding style (and for better readability). Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/vt/vt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index c072007807e1..42bc0957a654 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -2437,7 +2437,8 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) return; switch(c) { - case 'G': case '`': + case 'G': + case '`': if (vc->vc_par[0]) vc->vc_par[0]--; gotoxy(vc, vc->vc_par[0], vc->state.y); @@ -2447,12 +2448,14 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) vc->vc_par[0]++; gotoxy(vc, vc->state.x, vc->state.y - vc->vc_par[0]); return; - case 'B': case 'e': + case 'B': + case 'e': if (!vc->vc_par[0]) vc->vc_par[0]++; gotoxy(vc, vc->state.x, vc->state.y + vc->vc_par[0]); return; - case 'C': case 'a': + case 'C': + case 'a': if (!vc->vc_par[0]) vc->vc_par[0]++; gotoxy(vc, vc->state.x + vc->vc_par[0], vc->state.y); @@ -2477,7 +2480,8 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) vc->vc_par[0]--; gotoxay(vc, vc->state.x ,vc->vc_par[0]); return; - case 'H': case 'f': + case 'H': + case 'f': if (vc->vc_par[0]) vc->vc_par[0]--; if (vc->vc_par[1])