]> git.baikalelectronics.ru Git - kernel.git/commit
tty/vt: consolemap: make conv_uni_to_pc() more readable
authorJiri Slaby <jslaby@suse.cz>
Tue, 7 Jun 2022 10:49:41 +0000 (12:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 11:37:03 +0000 (13:37 +0200)
commit0691a914818c6e6b89a4bb7812f4eeefe55c8f0c
tree7cfa8b3e936519828a09846aa5d6fbc9b869566b
parent48192af7658734f60e58822f8c27a0f70affe5b1
tty/vt: consolemap: make conv_uni_to_pc() more readable

1) Fetch *conp->vc_uni_pagedir_loc first and do the NULL check on the local
   variable.
2) Decouple the large "if" into few smaller "if"s.
3) Remove a \n from the definition line.

This makes the code more readable.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20220607104946.18710-31-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/consolemap.c