vt: use tty_insert_flip_string in respond_string
authorJiri Slaby <jslaby@suse.cz>
Mon, 15 Jun 2020 07:48:40 +0000 (09:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:08:31 +0000 (17:08 +0200)
commitde53ce0427cd20886b0d53555dc576702cbb1ff8
tree0c127a71647417655bc825e8b9d27a67c32162c4
parent7d4a3112f07878ba9c6bffbcdb2dea2dcfc5c1f9
vt: use tty_insert_flip_string in respond_string

Pass the length of a string to respond_string and use
tty_insert_flip_string instead of a loop with tty_insert_flip_char. This
simplifies the processing on the tty side.

The added strlens are optimized during constant folding and propagation
and the result are proper constants in assembly.

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