[09/22] tty: vt: put cases on separate lines

Message ID 20240202065608.14019-10-jirislaby@kernel.org
State New
Headers
Series tty: vt: cleanup ESC sequences handling |

Commit Message

Jiri Slaby Feb. 2, 2024, 6:55 a.m. UTC
  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) <jirislaby@kernel.org>
---
 drivers/tty/vt/vt.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
  

Patch

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])