]> Gentwo Git Trees - linux/.git/commit
serial: 8250: extract serial8250_THRE_test()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 11 Jun 2025 10:03:01 +0000 (12:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jun 2025 11:42:35 +0000 (13:42 +0200)
commita194597c0cd35a7e8fc6386a717b56a653e3e0a0
tree11bd6f5a46013bb55cd855564686429adb52b1a0
parentcc852682f255664ff526630c438d929adc929543
serial: 8250: extract serial8250_THRE_test()

serial8250_do_startup() contains a stand-alone code for probing THRE.
Furthermore, the code block is conditional (port->irq and test for
UPF_NO_THRE_TEST).

Move this code to a separate function. The conditional can be evaluated
easier there -- by a simple return in the beginning. So the indentation
level lowers and the code is overall more readable now.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250611100319.186924-16-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_port.c