lkml.org 
[lkml]   [2020]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 24/38] vt: whitespace and paren cleanup in add_softcursor
Date
Format add_softcursor according to CodingStyle. Until now, it was a mess
of letters.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
drivers/tty/vt/vt.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index b1fdbf119755..f7d5a3c3845f 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -866,14 +866,18 @@ static void add_softcursor(struct vc_data *vc)
int i = scr_readw((u16 *) vc->vc_pos);
u32 type = vc->vc_cursor_type;

- if (! (type & 0x10)) return;
- if (softcursor_original != -1) return;
+ if (!(type & 0x10))
+ return;
+ if (softcursor_original != -1)
+ return;
softcursor_original = i;
- i |= ((type >> 8) & 0xff00 );
- i ^= ((type) & 0xff00 );
- if ((type & 0x20) && ((softcursor_original & 0x7000) == (i & 0x7000))) i ^= 0x7000;
- if ((type & 0x40) && ((i & 0x700) == ((i & 0x7000) >> 4))) i ^= 0x0700;
- scr_writew(i, (u16 *) vc->vc_pos);
+ i |= (type >> 8) & 0xff00;
+ i ^= type & 0xff00;
+ if ((type & 0x20) && (softcursor_original & 0x7000) == (i & 0x7000))
+ i ^= 0x7000;
+ if ((type & 0x40) && (i & 0x700) == ((i & 0x7000) >> 4))
+ i ^= 0x0700;
+ scr_writew(i, (u16 *)vc->vc_pos);
if (con_should_update(vc))
vc->vc_sw->con_putc(vc, i, vc->state.y, vc->state.x);
}
--
2.27.0
\
 
 \ /
  Last update: 2020-06-15 09:50    [W:0.118 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site