diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2024-01-22 12:03:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-27 18:08:52 -0800 |
commit | b3dd9bef75b626cebc3b4720df3c5c010d6a29aa (patch) | |
tree | b32419f30c4677566b848d608524d9ae7ad7c652 /include | |
parent | 0e6a92f67c8a94707f7bb27ac29e2bdf3e7c167d (diff) | |
download | linux-b3dd9bef75b626cebc3b4720df3c5c010d6a29aa.tar.gz linux-b3dd9bef75b626cebc3b4720df3c5c010d6a29aa.tar.bz2 linux-b3dd9bef75b626cebc3b4720df3c5c010d6a29aa.zip |
tty: vt: expect valid vc when in tty ops
At least since commits feebed6515a1 ("tty: shutdown method") and
bc1e99d93f09 ("TTY: vt, add ->install"), tty->driver_data in vc is
expected to be set since tty_operations::install() till ::cleanup().
So the checks of !tty->driver_data (aka !vc) in:
* vc_do_resize() by tty -> ioctl(TIOCSWINSZ) -> vt_resize()
* do_con_write() by tty -> tty_operations::write()/::put_char()
* con_flush_chars() by tty -> ::flush_chars()
are all superfluous. And also, holding a console lock is not needed to
fetch tty->driver_data.
Note there is even a stale comment in con_flush_chars() about a race
between that and con_close(). But con_close() does not set
tty->driver_data to NULL for years already.
Drop all these in a hope I am not terribly mistaken.
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Tested-by: Helge Deller <deller@gmx.de> # parisc STI console
Link: https://lore.kernel.org/r/20240122110401.7289-5-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions