summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2023-08-10 12:14:56 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-11 22:12:46 +0300
commita32a672dc5aaec1ccd246b3a27cee8a367b822c1 (patch)
tree26049a5bc69f5a55c211a3c6114d65192deec0c2 /drivers/tty/tty_io.c
parentf47a4fd67f2a803f205db7a4136571c2bd487297 (diff)
downloadlinux-a32a672dc5aaec1ccd246b3a27cee8a367b822c1.tar.xz
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>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index ea5041fbbf28..846460c02c58 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -961,8 +961,8 @@ int tty_write_lock(struct tty_struct *tty, bool ndelay)
* Split writes up in sane blocksizes to avoid
* denial-of-service type attacks
*/
-static inline ssize_t do_tty_write(struct tty_ldisc *ld, struct tty_struct *tty,
- struct file *file, struct iov_iter *from)
+static ssize_t iterate_tty_write(struct tty_ldisc *ld, struct tty_struct *tty,
+ struct file *file, struct iov_iter *from)
{
size_t count = iov_iter_count(from);
ssize_t ret, written = 0;
@@ -1090,7 +1090,7 @@ static ssize_t file_tty_write(struct file *file, struct kiocb *iocb, struct iov_
if (!ld->ops->write)
ret = -EIO;
else
- ret = do_tty_write(ld, tty, file, from);
+ ret = iterate_tty_write(ld, tty, file, from);
tty_ldisc_deref(ld);
return ret;
}