tty: drop tty_schedule_flip()
authorJiri Slaby <jslaby@suse.cz>
Mon, 22 Nov 2021 11:16:48 +0000 (12:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 17:35:23 +0000 (18:35 +0100)
Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). All
users were converted in the previous patches, so remove
tty_schedule_flip() completely while inlining its body into
tty_flip_buffer_push().

One less exported function.

Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20211122111648.30379-4-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_buffer.c
include/linux/tty_flip.h

index 6c7e65b1d9a1c27c009dc980525c59064b994c93..5b6875057ce2b7f13b319f6633fe5c167d0f1543 100644 (file)
@@ -401,27 +401,6 @@ int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag)
 }
 EXPORT_SYMBOL(__tty_insert_flip_char);
 
-/**
- *     tty_schedule_flip       -       push characters to ldisc
- *     @port: tty port to push from
- *
- *     Takes any pending buffers and transfers their ownership to the
- *     ldisc side of the queue. It then schedules those characters for
- *     processing by the line discipline.
- */
-
-void tty_schedule_flip(struct tty_port *port)
-{
-       struct tty_bufhead *buf = &port->buf;
-
-       /* paired w/ acquire in flush_to_ldisc(); ensures
-        * flush_to_ldisc() sees buffer data.
-        */
-       smp_store_release(&buf->tail->commit, buf->tail->used);
-       queue_work(system_unbound_wq, &buf->work);
-}
-EXPORT_SYMBOL(tty_schedule_flip);
-
 /**
  *     tty_prepare_flip_string         -       make room for characters
  *     @port: tty port
@@ -566,7 +545,14 @@ static void flush_to_ldisc(struct work_struct *work)
 
 void tty_flip_buffer_push(struct tty_port *port)
 {
-       tty_schedule_flip(port);
+       struct tty_bufhead *buf = &port->buf;
+
+       /*
+        * Paired w/ acquire in flush_to_ldisc(); ensures flush_to_ldisc() sees
+        * buffer data.
+        */
+       smp_store_release(&buf->tail->commit, buf->tail->used);
+       queue_work(system_unbound_wq, &buf->work);
 }
 EXPORT_SYMBOL(tty_flip_buffer_push);
 
index 9916acb5de495fca63e9a596c9968b86d92388a6..483d41cbcbb70c7a161553008c5009784f5c9d2c 100644 (file)
@@ -17,7 +17,6 @@ int tty_insert_flip_string_fixed_flag(struct tty_port *port,
 int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars,
                size_t size);
 void tty_flip_buffer_push(struct tty_port *port);
-void tty_schedule_flip(struct tty_port *port);
 int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag);
 
 static inline int tty_insert_flip_char(struct tty_port *port,