]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tty: n_tty: move more_to_be_read to the end of n_tty_read()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Mon, 17 Mar 2025 07:00:26 +0000 (08:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Mar 2025 15:00:51 +0000 (08:00 -0700)
commitf812af3642ef4f2ff3db49f33d097f1b8668ce72
treedc5de8d1b6066d6384be006cda7aa82fdb177e87
parent40315ce580691006633d80861a81541ee17fe511
tty: n_tty: move more_to_be_read to the end of n_tty_read()

n_tty_read() contains "we need more data" handling deep in that
function. And there is also a label (more_to_be_read) as we handle this
situation from two places.

It makes more sense to have all "return"s accumulated at the end of
functions. And "goto" from multiple places there. Therefore, do this
with the "more_to_be_read" label in n_tty_read().

After this and the previous changes, n_tty_read() is now much more
easier to follow.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250317070046.24386-12-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c