diff options
author | Jiri Slaby <jslaby@suse.cz> | 2020-06-15 09:48:56 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-24 17:08:33 +0200 |
commit | dc219db66ada76669b8ca23a1a9fbef703c9f6bd (patch) | |
tree | 4aa0db6ef58fd041f3562d9c6f4f7ea02439f1e0 /drivers/tty/vt | |
parent | vt: synchronize types and use min in csi_X (diff) | |
download | linux-dc219db66ada76669b8ca23a1a9fbef703c9f6bd.tar.xz linux-dc219db66ada76669b8ca23a1a9fbef703c9f6bd.zip |
vt: whitespace and paren cleanup in add_softcursor
Format add_softcursor according to CodingStyle. Until now, it was a mess
of letters.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200615074910.19267-24-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r-- | drivers/tty/vt/vt.c | 18 |
1 files 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); } |