Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tty: rename and de-inline do_tty_write()

Make do_tty_write()'s name sound similar to iterate_tty_read(). They
both do similar things, so there is no reason for so distinct names. The
new name is therefore iterate_tty_write().

Drop the unnedeed inline modifier too. Let the compiler decide.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230810091510.13006-23-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
a32a672d f47a4fd6

+3 -3
+3 -3
drivers/tty/tty_io.c
··· 961 961 * Split writes up in sane blocksizes to avoid 962 962 * denial-of-service type attacks 963 963 */ 964 - static inline ssize_t do_tty_write(struct tty_ldisc *ld, struct tty_struct *tty, 965 - struct file *file, struct iov_iter *from) 964 + static ssize_t iterate_tty_write(struct tty_ldisc *ld, struct tty_struct *tty, 965 + struct file *file, struct iov_iter *from) 966 966 { 967 967 size_t count = iov_iter_count(from); 968 968 ssize_t ret, written = 0; ··· 1090 1090 if (!ld->ops->write) 1091 1091 ret = -EIO; 1092 1092 else 1093 - ret = do_tty_write(ld, tty, file, from); 1093 + ret = iterate_tty_write(ld, tty, file, from); 1094 1094 tty_ldisc_deref(ld); 1095 1095 return ret; 1096 1096 }