vc_screen: extract vcs_write_buf
authorJiri Slaby <jslaby@suse.cz>
Tue, 18 Aug 2020 08:56:58 +0000 (10:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Aug 2020 11:45:21 +0000 (13:45 +0200)
commit95e0d57fd49780db89193bc2df67b9eec640c4be
tree52532e3edb8bda670103f2f2001f0b76038ad05d
parent9e6363784e3f1e90416b81c0d0cd16f6bfb304af
vc_screen: extract vcs_write_buf

This is the counterpart of the previous patch: here, we extract buffer
writing with attributes from vcs_write.

Now, there is no need for org to be initialized to NULL. The org0
check before update_region() confuses compilers, so check org instead.
It provides the same semantics. And it also eliminates the need for
initialization of org0.

We switch the branches of the attr 'if' too, as the inversion brings only
confusion now.

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