All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/16] tty: unexport tty_ldisc_release
@ 2021-09-14  9:11 Jiri Slaby
  2021-09-14  9:11 ` [PATCH 02/16] tty: remove flags from struct tty_ldisc_ops Jiri Slaby
                   ` (6 more replies)
  0 siblings, 7 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:11 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby

Initially, tty_ldisc_release() was exported for speakup (spk_tty) while
in staging. Later, the call to this function was removed as it was bogus
anyway.

Remove the export now.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/tty_ldisc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 756a4bfa6a69..3e4e0b20b4bb 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -812,7 +812,6 @@ void tty_ldisc_release(struct tty_struct *tty)
 
 	tty_ldisc_debug(tty, "released\n");
 }
-EXPORT_SYMBOL_GPL(tty_ldisc_release);
 
 /**
  *	tty_ldisc_init		-	ldisc setup for new tty
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 02/16] tty: remove flags from struct tty_ldisc_ops
  2021-09-14  9:11 [PATCH 01/16] tty: unexport tty_ldisc_release Jiri Slaby
@ 2021-09-14  9:11 ` Jiri Slaby
  2021-09-14  9:11 ` [PATCH 03/16] tty: remove extern from functions in tty headers Jiri Slaby
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:11 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby

The last user was apparently removed by commit a352def21a64 (tty: Ldisc
revamp) in 2008. So remove the field completely, the only setter
(n_tty_inherit_ops) and also its only possible value
(LDISC_FLAG_DEFINED).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/n_tty.c       | 1 -
 include/linux/tty_ldisc.h | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 0965793dfe4f..dcb5e6ef8747 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -2450,7 +2450,6 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
 {
 	*ops = n_tty_ops;
 	ops->owner = NULL;
-	ops->flags = 0;
 }
 EXPORT_SYMBOL_GPL(n_tty_inherit_ops);
 
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index b1d812e902aa..1f37184eee63 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -180,7 +180,6 @@ extern int ldsem_down_write_nested(struct ld_semaphore *sem, int subclass,
 struct tty_ldisc_ops {
 	char	*name;
 	int	num;
-	int	flags;
 
 	/*
 	 * The following routines are called from above.
@@ -220,8 +219,6 @@ struct tty_ldisc {
 	struct tty_struct *tty;
 };
 
-#define LDISC_FLAG_DEFINED	0x00000001
-
 #define MODULE_ALIAS_LDISC(ldisc) \
 	MODULE_ALIAS("tty-ldisc-" __stringify(ldisc))
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 03/16] tty: remove extern from functions in tty headers
  2021-09-14  9:11 [PATCH 01/16] tty: unexport tty_ldisc_release Jiri Slaby
  2021-09-14  9:11 ` [PATCH 02/16] tty: remove flags from struct tty_ldisc_ops Jiri Slaby
@ 2021-09-14  9:11 ` Jiri Slaby
  2021-09-14  9:11 ` [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void Jiri Slaby
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:11 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby

After the recent headers cleanup, some function declarations still have
extern before them. It is superfluous (for function declarations), so
remove extern from those which still have it.

This unifies them with the rest of the files.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 include/linux/tty.h        | 139 ++++++++++++++++++-------------------
 include/linux/tty_driver.h |   8 +--
 include/linux/tty_flip.h   |  20 +++---
 include/linux/tty_ldisc.h  |  22 +++---
 4 files changed, 94 insertions(+), 95 deletions(-)

diff --git a/include/linux/tty.h b/include/linux/tty.h
index 168e57e40bbb..15453b0c4081 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -252,20 +252,20 @@ static inline bool tty_throttled(struct tty_struct *tty)
 }
 
 #ifdef CONFIG_TTY
-extern void tty_kref_put(struct tty_struct *tty);
-extern struct pid *tty_get_pgrp(struct tty_struct *tty);
-extern void tty_vhangup_self(void);
-extern void disassociate_ctty(int priv);
-extern dev_t tty_devnum(struct tty_struct *tty);
-extern void proc_clear_tty(struct task_struct *p);
-extern struct tty_struct *get_current_tty(void);
+void tty_kref_put(struct tty_struct *tty);
+struct pid *tty_get_pgrp(struct tty_struct *tty);
+void tty_vhangup_self(void);
+void disassociate_ctty(int priv);
+dev_t tty_devnum(struct tty_struct *tty);
+void proc_clear_tty(struct task_struct *p);
+struct tty_struct *get_current_tty(void);
 /* tty_io.c */
-extern int __init tty_init(void);
-extern const char *tty_name(const struct tty_struct *tty);
-extern struct tty_struct *tty_kopen_exclusive(dev_t device);
-extern struct tty_struct *tty_kopen_shared(dev_t device);
-extern void tty_kclose(struct tty_struct *tty);
-extern int tty_dev_name_to_number(const char *name, dev_t *number);
+int __init tty_init(void);
+const char *tty_name(const struct tty_struct *tty);
+struct tty_struct *tty_kopen_exclusive(dev_t device);
+struct tty_struct *tty_kopen_shared(dev_t device);
+void tty_kclose(struct tty_struct *tty);
+int tty_dev_name_to_number(const char *name, dev_t *number);
 #else
 static inline void tty_kref_put(struct tty_struct *tty)
 { }
@@ -296,7 +296,7 @@ static inline int tty_dev_name_to_number(const char *name, dev_t *number)
 
 extern struct ktermios tty_std_termios;
 
-extern int vcs_init(void);
+int vcs_init(void);
 
 extern struct class *tty_class;
 
@@ -316,34 +316,34 @@ static inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
 	return tty;
 }
 
-extern const char *tty_driver_name(const struct tty_struct *tty);
-extern void tty_wait_until_sent(struct tty_struct *tty, long timeout);
-extern void stop_tty(struct tty_struct *tty);
-extern void start_tty(struct tty_struct *tty);
-extern void tty_write_message(struct tty_struct *tty, char *msg);
-extern int tty_send_xchar(struct tty_struct *tty, char ch);
-extern int tty_put_char(struct tty_struct *tty, unsigned char c);
-extern unsigned int tty_chars_in_buffer(struct tty_struct *tty);
-extern unsigned int tty_write_room(struct tty_struct *tty);
-extern void tty_driver_flush_buffer(struct tty_struct *tty);
-extern void tty_unthrottle(struct tty_struct *tty);
-extern int tty_throttle_safe(struct tty_struct *tty);
-extern int tty_unthrottle_safe(struct tty_struct *tty);
-extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws);
-extern int tty_get_icount(struct tty_struct *tty,
-			  struct serial_icounter_struct *icount);
-extern int is_current_pgrp_orphaned(void);
-extern void tty_hangup(struct tty_struct *tty);
-extern void tty_vhangup(struct tty_struct *tty);
-extern int tty_hung_up_p(struct file *filp);
-extern void do_SAK(struct tty_struct *tty);
-extern void __do_SAK(struct tty_struct *tty);
-extern void no_tty(void);
-extern speed_t tty_termios_baud_rate(struct ktermios *termios);
-extern void tty_termios_encode_baud_rate(struct ktermios *termios,
-						speed_t ibaud, speed_t obaud);
-extern void tty_encode_baud_rate(struct tty_struct *tty,
-						speed_t ibaud, speed_t obaud);
+const char *tty_driver_name(const struct tty_struct *tty);
+void tty_wait_until_sent(struct tty_struct *tty, long timeout);
+void stop_tty(struct tty_struct *tty);
+void start_tty(struct tty_struct *tty);
+void tty_write_message(struct tty_struct *tty, char *msg);
+int tty_send_xchar(struct tty_struct *tty, char ch);
+int tty_put_char(struct tty_struct *tty, unsigned char c);
+unsigned int tty_chars_in_buffer(struct tty_struct *tty);
+unsigned int tty_write_room(struct tty_struct *tty);
+void tty_driver_flush_buffer(struct tty_struct *tty);
+void tty_unthrottle(struct tty_struct *tty);
+int tty_throttle_safe(struct tty_struct *tty);
+int tty_unthrottle_safe(struct tty_struct *tty);
+int tty_do_resize(struct tty_struct *tty, struct winsize *ws);
+int tty_get_icount(struct tty_struct *tty,
+		struct serial_icounter_struct *icount);
+int is_current_pgrp_orphaned(void);
+void tty_hangup(struct tty_struct *tty);
+void tty_vhangup(struct tty_struct *tty);
+int tty_hung_up_p(struct file *filp);
+void do_SAK(struct tty_struct *tty);
+void __do_SAK(struct tty_struct *tty);
+void no_tty(void);
+speed_t tty_termios_baud_rate(struct ktermios *termios);
+void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud,
+		speed_t obaud);
+void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud,
+		speed_t obaud);
 
 /**
  *	tty_get_baud_rate	-	get tty bit rates
@@ -363,37 +363,37 @@ static inline speed_t tty_get_baud_rate(struct tty_struct *tty)
 unsigned char tty_get_char_size(unsigned int cflag);
 unsigned char tty_get_frame_size(unsigned int cflag);
 
-extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old);
-extern int tty_termios_hw_change(const struct ktermios *a, const struct ktermios *b);
-extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
+void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old);
+int tty_termios_hw_change(const struct ktermios *a, const struct ktermios *b);
+int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
 
-extern void tty_wakeup(struct tty_struct *tty);
+void tty_wakeup(struct tty_struct *tty);
 
-extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
+int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
 			unsigned int cmd, unsigned long arg);
-extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg);
-extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx);
-extern void tty_release_struct(struct tty_struct *tty, int idx);
-extern void tty_init_termios(struct tty_struct *tty);
-extern void tty_save_termios(struct tty_struct *tty);
-extern int tty_standard_install(struct tty_driver *driver,
+int tty_perform_flush(struct tty_struct *tty, unsigned long arg);
+struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx);
+void tty_release_struct(struct tty_struct *tty, int idx);
+void tty_init_termios(struct tty_struct *tty);
+void tty_save_termios(struct tty_struct *tty);
+int tty_standard_install(struct tty_driver *driver,
 		struct tty_struct *tty);
 
 extern struct mutex tty_mutex;
 
 /* n_tty.c */
-extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops);
+void n_tty_inherit_ops(struct tty_ldisc_ops *ops);
 #ifdef CONFIG_TTY
-extern void __init n_tty_init(void);
+void __init n_tty_init(void);
 #else
 static inline void n_tty_init(void) { }
 #endif
 
 /* tty_audit.c */
 #ifdef CONFIG_AUDIT
-extern void tty_audit_exit(void);
-extern void tty_audit_fork(struct signal_struct *sig);
-extern int tty_audit_push(void);
+void tty_audit_exit(void);
+void tty_audit_fork(struct signal_struct *sig);
+int tty_audit_push(void);
 #else
 static inline void tty_audit_exit(void)
 {
@@ -408,24 +408,23 @@ static inline int tty_audit_push(void)
 #endif
 
 /* tty_ioctl.c */
-extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
-		       unsigned int cmd, unsigned long arg);
+int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
+		unsigned int cmd, unsigned long arg);
 
 /* vt.c */
 
-extern int vt_ioctl(struct tty_struct *tty,
-		    unsigned int cmd, unsigned long arg);
+int vt_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
 
-extern long vt_compat_ioctl(struct tty_struct *tty,
-		     unsigned int cmd, unsigned long arg);
+long vt_compat_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg);
 
 /* tty_mutex.c */
 /* functions for preparation of BKL removal */
-extern void tty_lock(struct tty_struct *tty);
-extern int  tty_lock_interruptible(struct tty_struct *tty);
-extern void tty_unlock(struct tty_struct *tty);
-extern void tty_lock_slave(struct tty_struct *tty);
-extern void tty_unlock_slave(struct tty_struct *tty);
-extern void tty_set_lock_subclass(struct tty_struct *tty);
+void tty_lock(struct tty_struct *tty);
+int  tty_lock_interruptible(struct tty_struct *tty);
+void tty_unlock(struct tty_struct *tty);
+void tty_lock_slave(struct tty_struct *tty);
+void tty_unlock_slave(struct tty_struct *tty);
+void tty_set_lock_subclass(struct tty_struct *tty);
 
 #endif
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index c20431d8def8..29e1cf178afb 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -327,11 +327,11 @@ struct tty_driver {
 
 extern struct list_head tty_drivers;
 
-extern struct tty_driver *__tty_alloc_driver(unsigned int lines,
-		struct module *owner, unsigned long flags);
-extern struct tty_driver *tty_find_polling_driver(char *name, int *line);
+struct tty_driver *__tty_alloc_driver(unsigned int lines, struct module *owner,
+		unsigned long flags);
+struct tty_driver *tty_find_polling_driver(char *name, int *line);
 
-extern void tty_driver_kref_put(struct tty_driver *driver);
+void tty_driver_kref_put(struct tty_driver *driver);
 
 /* Use TTY_DRIVER_* flags below */
 #define tty_alloc_driver(lines, flags) \
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index 32284992b31a..9916acb5de49 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -7,16 +7,16 @@
 
 struct tty_ldisc;
 
-extern int tty_buffer_set_limit(struct tty_port *port, int limit);
-extern unsigned int tty_buffer_space_avail(struct tty_port *port);
-extern int tty_buffer_request_room(struct tty_port *port, size_t size);
-extern int tty_insert_flip_string_flags(struct tty_port *port,
+int tty_buffer_set_limit(struct tty_port *port, int limit);
+unsigned int tty_buffer_space_avail(struct tty_port *port);
+int tty_buffer_request_room(struct tty_port *port, size_t size);
+int tty_insert_flip_string_flags(struct tty_port *port,
 		const unsigned char *chars, const char *flags, size_t size);
-extern int tty_insert_flip_string_fixed_flag(struct tty_port *port,
+int tty_insert_flip_string_fixed_flag(struct tty_port *port,
 		const unsigned char *chars, char flag, size_t size);
-extern int tty_prepare_flip_string(struct tty_port *port,
-		unsigned char **chars, size_t size);
-extern void tty_flip_buffer_push(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);
 
@@ -45,7 +45,7 @@ static inline int tty_insert_flip_string(struct tty_port *port,
 int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
 		const char *f, int count);
 
-extern void tty_buffer_lock_exclusive(struct tty_port *port);
-extern void tty_buffer_unlock_exclusive(struct tty_port *port);
+void tty_buffer_lock_exclusive(struct tty_port *port);
+void tty_buffer_unlock_exclusive(struct tty_port *port);
 
 #endif /* _LINUX_TTY_FLIP_H */
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index 1f37184eee63..4d1c128afbfa 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -146,7 +146,7 @@ struct ld_semaphore {
 #endif
 };
 
-extern void __init_ldsem(struct ld_semaphore *sem, const char *name,
+void __init_ldsem(struct ld_semaphore *sem, const char *name,
 			 struct lock_class_key *key);
 
 #define init_ldsem(sem)						\
@@ -157,18 +157,18 @@ do {								\
 } while (0)
 
 
-extern int ldsem_down_read(struct ld_semaphore *sem, long timeout);
-extern int ldsem_down_read_trylock(struct ld_semaphore *sem);
-extern int ldsem_down_write(struct ld_semaphore *sem, long timeout);
-extern int ldsem_down_write_trylock(struct ld_semaphore *sem);
-extern void ldsem_up_read(struct ld_semaphore *sem);
-extern void ldsem_up_write(struct ld_semaphore *sem);
+int ldsem_down_read(struct ld_semaphore *sem, long timeout);
+int ldsem_down_read_trylock(struct ld_semaphore *sem);
+int ldsem_down_write(struct ld_semaphore *sem, long timeout);
+int ldsem_down_write_trylock(struct ld_semaphore *sem);
+void ldsem_up_read(struct ld_semaphore *sem);
+void ldsem_up_write(struct ld_semaphore *sem);
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-extern int ldsem_down_read_nested(struct ld_semaphore *sem, int subclass,
-				  long timeout);
-extern int ldsem_down_write_nested(struct ld_semaphore *sem, int subclass,
-				   long timeout);
+int ldsem_down_read_nested(struct ld_semaphore *sem, int subclass,
+		long timeout);
+int ldsem_down_write_nested(struct ld_semaphore *sem, int subclass,
+		long timeout);
 #else
 # define ldsem_down_read_nested(sem, subclass, timeout)		\
 		ldsem_down_read(sem, timeout)
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void
  2021-09-14  9:11 [PATCH 01/16] tty: unexport tty_ldisc_release Jiri Slaby
  2021-09-14  9:11 ` [PATCH 02/16] tty: remove flags from struct tty_ldisc_ops Jiri Slaby
  2021-09-14  9:11 ` [PATCH 03/16] tty: remove extern from functions in tty headers Jiri Slaby
@ 2021-09-14  9:11 ` Jiri Slaby
  2021-09-15  8:05   ` Marc Kleine-Budde
                     ` (2 more replies)
  2021-09-14  9:11 ` [PATCH 05/16] tty: remove file from tty_mode_ioctl Jiri Slaby
                   ` (3 subsequent siblings)
  6 siblings, 3 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:11 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, Dmitry Torokhov,
	Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
	Jakub Kicinski, Paul Mackerras, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi

The documentation says that the return value of tty_ldisc_ops::hangup
hook is ignored. And it really is, so there is no point for its return
type to be int. Switch it to void and all the hooks too.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
---
 Documentation/driver-api/serial/tty.rst | 2 +-
 drivers/input/serio/serport.c           | 3 +--
 drivers/net/can/slcan.c                 | 3 +--
 drivers/net/ppp/ppp_async.c             | 3 +--
 drivers/net/ppp/ppp_synctty.c           | 3 +--
 drivers/net/slip/slip.c                 | 3 +--
 include/linux/tty_ldisc.h               | 2 +-
 sound/soc/codecs/cx20442.c              | 3 +--
 sound/soc/ti/ams-delta.c                | 3 +--
 9 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/Documentation/driver-api/serial/tty.rst b/Documentation/driver-api/serial/tty.rst
index dd972caacf3e..4b709f392713 100644
--- a/Documentation/driver-api/serial/tty.rst
+++ b/Documentation/driver-api/serial/tty.rst
@@ -58,7 +58,7 @@ close()			This is called on a terminal when the line
 hangup()		Called when the tty line is hung up.
 			The line discipline should cease I/O to the tty.
 			No further calls into the ldisc code will occur.
-			The return value is ignored. Can sleep.
+			Can sleep.
 
 read()			(optional) A process requests reading data from
 			the line. Multiple read calls may occur in parallel
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
index 7fbbe00e3553..17eb8f2aa48d 100644
--- a/drivers/input/serio/serport.c
+++ b/drivers/input/serio/serport.c
@@ -244,7 +244,7 @@ static int serport_ldisc_compat_ioctl(struct tty_struct *tty,
 }
 #endif
 
-static int serport_ldisc_hangup(struct tty_struct *tty)
+static void serport_ldisc_hangup(struct tty_struct *tty)
 {
 	struct serport *serport = (struct serport *) tty->disc_data;
 	unsigned long flags;
@@ -254,7 +254,6 @@ static int serport_ldisc_hangup(struct tty_struct *tty)
 	spin_unlock_irqrestore(&serport->lock, flags);
 
 	wake_up_interruptible(&serport->wait);
-	return 0;
 }
 
 static void serport_ldisc_write_wakeup(struct tty_struct * tty)
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index d42ec7d1bc14..012da4b8abe0 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -664,10 +664,9 @@ static void slcan_close(struct tty_struct *tty)
 	/* This will complete via sl_free_netdev */
 }
 
-static int slcan_hangup(struct tty_struct *tty)
+static void slcan_hangup(struct tty_struct *tty)
 {
 	slcan_close(tty);
-	return 0;
 }
 
 /* Perform I/O control on an active SLCAN channel. */
diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index 29a93d6bfe37..78ec1bcebc4f 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -247,10 +247,9 @@ ppp_asynctty_close(struct tty_struct *tty)
  * Wait for I/O to driver to complete and unregister PPP channel.
  * This is already done by the close routine, so just call that.
  */
-static int ppp_asynctty_hangup(struct tty_struct *tty)
+static void ppp_asynctty_hangup(struct tty_struct *tty)
 {
 	ppp_asynctty_close(tty);
-	return 0;
 }
 
 /*
diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c
index af3e048695b6..c249db7c466a 100644
--- a/drivers/net/ppp/ppp_synctty.c
+++ b/drivers/net/ppp/ppp_synctty.c
@@ -245,10 +245,9 @@ ppp_sync_close(struct tty_struct *tty)
  * Wait for I/O to driver to complete and unregister PPP channel.
  * This is already done by the close routine, so just call that.
  */
-static int ppp_sync_hangup(struct tty_struct *tty)
+static void ppp_sync_hangup(struct tty_struct *tty)
 {
 	ppp_sync_close(tty);
-	return 0;
 }
 
 /*
diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
index 5435b5689ce6..8be9d0c351b5 100644
--- a/drivers/net/slip/slip.c
+++ b/drivers/net/slip/slip.c
@@ -907,10 +907,9 @@ static void slip_close(struct tty_struct *tty)
 	/* This will complete via sl_free_netdev */
 }
 
-static int slip_hangup(struct tty_struct *tty)
+static void slip_hangup(struct tty_struct *tty)
 {
 	slip_close(tty);
-	return 0;
 }
  /************************************************************************
   *			STANDARD SLIP ENCAPSULATION		  	 *
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index 4d1c128afbfa..b85d84fb5f49 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -199,7 +199,7 @@ struct tty_ldisc_ops {
 	void	(*set_termios)(struct tty_struct *tty, struct ktermios *old);
 	__poll_t (*poll)(struct tty_struct *, struct file *,
 			     struct poll_table_struct *);
-	int	(*hangup)(struct tty_struct *tty);
+	void	(*hangup)(struct tty_struct *tty);
 
 	/*
 	 * The following routines are called from below.
diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
index 13258f3ca9aa..1af0bf5f1e2f 100644
--- a/sound/soc/codecs/cx20442.c
+++ b/sound/soc/codecs/cx20442.c
@@ -252,10 +252,9 @@ static void v253_close(struct tty_struct *tty)
 }
 
 /* Line discipline .hangup() */
-static int v253_hangup(struct tty_struct *tty)
+static void v253_hangup(struct tty_struct *tty)
 {
 	v253_close(tty);
-	return 0;
 }
 
 /* Line discipline .receive_buf() */
diff --git a/sound/soc/ti/ams-delta.c b/sound/soc/ti/ams-delta.c
index ecd24d412a9b..b1a32545babd 100644
--- a/sound/soc/ti/ams-delta.c
+++ b/sound/soc/ti/ams-delta.c
@@ -330,10 +330,9 @@ static void cx81801_close(struct tty_struct *tty)
 }
 
 /* Line discipline .hangup() */
-static int cx81801_hangup(struct tty_struct *tty)
+static void cx81801_hangup(struct tty_struct *tty)
 {
 	cx81801_close(tty);
-	return 0;
 }
 
 /* Line discipline .receive_buf() */
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 05/16] tty: remove file from tty_mode_ioctl
  2021-09-14  9:11 [PATCH 01/16] tty: unexport tty_ldisc_release Jiri Slaby
                   ` (2 preceding siblings ...)
  2021-09-14  9:11 ` [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void Jiri Slaby
@ 2021-09-14  9:11 ` Jiri Slaby
  2021-09-15  8:05   ` Marc Kleine-Budde
  2021-09-14  9:11 ` [PATCH 06/16] tty: remove file from n_tty_ioctl_helper Jiri Slaby
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:11 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Andreas Koensgen, Paul Mackerras

The only user of 'file' parameter in tty_mode_ioctl is a BUG_ON check.
Provided it never crashed for anyone, it's an overkill to pass the
parameter to tty_mode_ioctl only for this check.

If we wanted to check 'file' there, we should handle it in more graceful
way anyway. Not by a BUG == crash.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
Cc: Paul Mackerras <paulus@samba.org>
---
 drivers/net/can/slcan.c       | 2 +-
 drivers/net/hamradio/6pack.c  | 2 +-
 drivers/net/ppp/ppp_async.c   | 2 +-
 drivers/net/ppp/ppp_synctty.c | 2 +-
 drivers/net/slip/slip.c       | 2 +-
 drivers/tty/tty_ioctl.c       | 8 ++------
 include/linux/tty.h           | 3 +--
 7 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index 012da4b8abe0..9a4ebda30510 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -691,7 +691,7 @@ static int slcan_ioctl(struct tty_struct *tty, struct file *file,
 		return -EINVAL;
 
 	default:
-		return tty_mode_ioctl(tty, file, cmd, arg);
+		return tty_mode_ioctl(tty, cmd, arg);
 	}
 }
 
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 8fe8887d506a..05404f7a3204 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -732,7 +732,7 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file,
 			break;
 		}
 	default:
-		err = tty_mode_ioctl(tty, file, cmd, arg);
+		err = tty_mode_ioctl(tty, cmd, arg);
 	}
 
 	sp_put(sp);
diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index 78ec1bcebc4f..6492523fc234 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -322,7 +322,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
 
 	default:
 		/* Try the various mode ioctls */
-		err = tty_mode_ioctl(tty, file, cmd, arg);
+		err = tty_mode_ioctl(tty, cmd, arg);
 	}
 
 	ap_put(ap);
diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c
index c249db7c466a..ebbfea0e1140 100644
--- a/drivers/net/ppp/ppp_synctty.c
+++ b/drivers/net/ppp/ppp_synctty.c
@@ -314,7 +314,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
 		break;
 
 	default:
-		err = tty_mode_ioctl(tty, file, cmd, arg);
+		err = tty_mode_ioctl(tty, cmd, arg);
 		break;
 	}
 
diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
index 8be9d0c351b5..9f3b4c1aa5ce 100644
--- a/drivers/net/slip/slip.c
+++ b/drivers/net/slip/slip.c
@@ -1173,7 +1173,7 @@ static int slip_ioctl(struct tty_struct *tty, struct file *file,
 	/* VSV changes end */
 #endif
 	default:
-		return tty_mode_ioctl(tty, file, cmd, arg);
+		return tty_mode_ioctl(tty, cmd, arg);
 	}
 }
 
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 507a25d692bb..99a29d72d294 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -675,7 +675,6 @@ static int tty_change_softcar(struct tty_struct *tty, int arg)
 /**
  *	tty_mode_ioctl		-	mode related ioctls
  *	@tty: tty for the ioctl
- *	@file: file pointer for the tty
  *	@cmd: command
  *	@arg: ioctl argument
  *
@@ -684,16 +683,13 @@ static int tty_change_softcar(struct tty_struct *tty, int arg)
  *	consistent mode setting.
  */
 
-int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
-			unsigned int cmd, unsigned long arg)
+int tty_mode_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
 {
 	struct tty_struct *real_tty;
 	void __user *p = (void __user *)arg;
 	int ret = 0;
 	struct ktermios kterm;
 
-	BUG_ON(file == NULL);
-
 	if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
 	    tty->driver->subtype == PTY_TYPE_MASTER)
 		real_tty = tty->link;
@@ -904,7 +900,7 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
 		return __tty_perform_flush(tty, arg);
 	default:
 		/* Try the mode commands */
-		return tty_mode_ioctl(tty, file, cmd, arg);
+		return tty_mode_ioctl(tty, cmd, arg);
 	}
 }
 EXPORT_SYMBOL(n_tty_ioctl_helper);
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 15453b0c4081..5e73f577c2b4 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -369,8 +369,7 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
 
 void tty_wakeup(struct tty_struct *tty);
 
-int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
-			unsigned int cmd, unsigned long arg);
+int tty_mode_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
 int tty_perform_flush(struct tty_struct *tty, unsigned long arg);
 struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx);
 void tty_release_struct(struct tty_struct *tty, int idx);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 06/16] tty: remove file from n_tty_ioctl_helper
  2021-09-14  9:11 [PATCH 01/16] tty: unexport tty_ldisc_release Jiri Slaby
                   ` (3 preceding siblings ...)
  2021-09-14  9:11 ` [PATCH 05/16] tty: remove file from tty_mode_ioctl Jiri Slaby
@ 2021-09-14  9:11 ` Jiri Slaby
  2021-09-14  9:15   ` Krzysztof Kozlowski
  2021-09-14  9:11 ` [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl Jiri Slaby
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
  6 siblings, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:11 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, Marcel Holtmann,
	Johan Hedberg, Luiz Augusto von Dentz, Paul Mackerras,
	David S. Miller, Jakub Kicinski, Krzysztof Kozlowski

After the previous patch, there are no users of 'file' in
n_tty_ioctl_helper. So remove it also from there.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 drivers/bluetooth/hci_ldisc.c | 2 +-
 drivers/net/ppp/ppp_async.c   | 2 +-
 drivers/net/ppp/ppp_synctty.c | 2 +-
 drivers/tty/n_gsm.c           | 2 +-
 drivers/tty/n_hdlc.c          | 2 +-
 drivers/tty/n_tty.c           | 2 +-
 drivers/tty/tty_ioctl.c       | 4 ++--
 include/linux/tty.h           | 4 ++--
 net/nfc/nci/uart.c            | 2 +-
 9 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 5ed2cfa7da1d..824d1c7e3e53 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -790,7 +790,7 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
 		break;
 
 	default:
-		err = n_tty_ioctl_helper(tty, file, cmd, arg);
+		err = n_tty_ioctl_helper(tty, cmd, arg);
 		break;
 	}
 
diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index 6492523fc234..f4429b93a9c8 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -310,7 +310,7 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
 		/* flush our buffers and the serial port's buffer */
 		if (arg == TCIOFLUSH || arg == TCOFLUSH)
 			ppp_async_flush_output(ap);
-		err = n_tty_ioctl_helper(tty, file, cmd, arg);
+		err = n_tty_ioctl_helper(tty, cmd, arg);
 		break;
 
 	case FIONREAD:
diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c
index ebbfea0e1140..b3a71b409a80 100644
--- a/drivers/net/ppp/ppp_synctty.c
+++ b/drivers/net/ppp/ppp_synctty.c
@@ -303,7 +303,7 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
 		/* flush our buffers and the serial port's buffer */
 		if (arg == TCIOFLUSH || arg == TCOFLUSH)
 			ppp_sync_flush_output(ap);
-		err = n_tty_ioctl_helper(tty, file, cmd, arg);
+		err = n_tty_ioctl_helper(tty, cmd, arg);
 		break;
 
 	case FIONREAD:
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 1d92d2a84889..03a98c93006a 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -2651,7 +2651,7 @@ static int gsmld_ioctl(struct tty_struct *tty, struct file *file,
 		base = mux_num_to_base(gsm);
 		return put_user(base + 1, (__u32 __user *)arg);
 	default:
-		return n_tty_ioctl_helper(tty, file, cmd, arg);
+		return n_tty_ioctl_helper(tty, cmd, arg);
 	}
 }
 
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index 580a37b3fe1b..7e0884ecc74f 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -630,7 +630,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
 		fallthrough;	/* to default */
 
 	default:
-		error = n_tty_ioctl_helper(tty, file, cmd, arg);
+		error = n_tty_ioctl_helper(tty, cmd, arg);
 		break;
 	}
 	return error;
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index dcb5e6ef8747..9fc2319a394d 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -2418,7 +2418,7 @@ static int n_tty_ioctl(struct tty_struct *tty, struct file *file,
 		up_write(&tty->termios_rwsem);
 		return put_user(retval, (unsigned int __user *) arg);
 	default:
-		return n_tty_ioctl_helper(tty, file, cmd, arg);
+		return n_tty_ioctl_helper(tty, cmd, arg);
 	}
 }
 
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 99a29d72d294..63181925ec1a 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -854,8 +854,8 @@ int tty_perform_flush(struct tty_struct *tty, unsigned long arg)
 }
 EXPORT_SYMBOL_GPL(tty_perform_flush);
 
-int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
-		       unsigned int cmd, unsigned long arg)
+int n_tty_ioctl_helper(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	int retval;
 
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 5e73f577c2b4..5dbd7c5afac7 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -407,8 +407,8 @@ static inline int tty_audit_push(void)
 #endif
 
 /* tty_ioctl.c */
-int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
-		unsigned int cmd, unsigned long arg);
+int n_tty_ioctl_helper(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg);
 
 /* vt.c */
 
diff --git a/net/nfc/nci/uart.c b/net/nfc/nci/uart.c
index 502e7a3f8948..9bdd9a7d187e 100644
--- a/net/nfc/nci/uart.c
+++ b/net/nfc/nci/uart.c
@@ -349,7 +349,7 @@ static int nci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
 			return -EBUSY;
 		break;
 	default:
-		err = n_tty_ioctl_helper(tty, file, cmd, arg);
+		err = n_tty_ioctl_helper(tty, cmd, arg);
 		break;
 	}
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl
  2021-09-14  9:11 [PATCH 01/16] tty: unexport tty_ldisc_release Jiri Slaby
                   ` (4 preceding siblings ...)
  2021-09-14  9:11 ` [PATCH 06/16] tty: remove file from n_tty_ioctl_helper Jiri Slaby
@ 2021-09-14  9:11 ` Jiri Slaby
  2021-09-14  9:16   ` Krzysztof Kozlowski
                     ` (2 more replies)
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
  6 siblings, 3 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:11 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, Marcel Holtmann,
	Johan Hedberg, Luiz Augusto von Dentz, Dmitry Torokhov,
	Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
	Jakub Kicinski, Andreas Koensgen, Paul Mackerras,
	Krzysztof Kozlowski

After the previous patches, noone needs 'file' parameter in neither
ioctl hook from tty_ldisc_ops. So remove 'file' from both of them.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
 drivers/bluetooth/hci_ldisc.c |  5 ++---
 drivers/input/serio/serport.c |  5 ++---
 drivers/net/can/slcan.c       |  4 ++--
 drivers/net/hamradio/6pack.c  |  4 ++--
 drivers/net/hamradio/mkiss.c  |  4 ++--
 drivers/net/ppp/ppp_async.c   |  3 +--
 drivers/net/ppp/ppp_synctty.c |  3 +--
 drivers/net/slip/slip.c       |  4 ++--
 drivers/tty/n_gsm.c           |  4 ++--
 drivers/tty/n_hdlc.c          |  5 ++---
 drivers/tty/n_tty.c           |  4 ++--
 drivers/tty/tty_io.c          |  8 ++++----
 include/linux/tty_ldisc.h     | 15 +++++++--------
 net/nfc/nci/uart.c            |  5 ++---
 14 files changed, 33 insertions(+), 40 deletions(-)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 824d1c7e3e53..6b5329784f17 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -736,14 +736,13 @@ static int hci_uart_set_flags(struct hci_uart *hu, unsigned long flags)
  * Arguments:
  *
  *    tty        pointer to tty instance data
- *    file       pointer to open file object for device
  *    cmd        IOCTL command code
  *    arg        argument for IOCTL call (cmd dependent)
  *
  * Return Value:    Command dependent
  */
-static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
-			      unsigned int cmd, unsigned long arg)
+static int hci_uart_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	struct hci_uart *hu = tty->disc_data;
 	int err = 0;
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
index 17eb8f2aa48d..55e91d0e70ec 100644
--- a/drivers/input/serio/serport.c
+++ b/drivers/input/serio/serport.c
@@ -207,8 +207,8 @@ static void serport_set_type(struct tty_struct *tty, unsigned long type)
  * serport_ldisc_ioctl() allows to set the port protocol, and device ID
  */
 
-static int serport_ldisc_ioctl(struct tty_struct *tty, struct file *file,
-			       unsigned int cmd, unsigned long arg)
+static int serport_ldisc_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	if (cmd == SPIOCSTYPE) {
 		unsigned long type;
@@ -226,7 +226,6 @@ static int serport_ldisc_ioctl(struct tty_struct *tty, struct file *file,
 #ifdef CONFIG_COMPAT
 #define COMPAT_SPIOCSTYPE	_IOW('q', 0x01, compat_ulong_t)
 static int serport_ldisc_compat_ioctl(struct tty_struct *tty,
-				       struct file *file,
 				       unsigned int cmd, unsigned long arg)
 {
 	if (cmd == COMPAT_SPIOCSTYPE) {
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index 9a4ebda30510..de2da1b09a79 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -670,8 +670,8 @@ static void slcan_hangup(struct tty_struct *tty)
 }
 
 /* Perform I/O control on an active SLCAN channel. */
-static int slcan_ioctl(struct tty_struct *tty, struct file *file,
-		       unsigned int cmd, unsigned long arg)
+static int slcan_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	struct slcan *sl = (struct slcan *) tty->disc_data;
 	unsigned int tmp;
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 05404f7a3204..300731ccbd66 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -680,8 +680,8 @@ static void sixpack_close(struct tty_struct *tty)
 }
 
 /* Perform I/O control on an active 6pack channel. */
-static int sixpack_ioctl(struct tty_struct *tty, struct file *file,
-	unsigned int cmd, unsigned long arg)
+static int sixpack_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	struct sixpack *sp = sp_get(tty);
 	struct net_device *dev;
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 8666110bec55..1a4877abc562 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -803,8 +803,8 @@ static void mkiss_close(struct tty_struct *tty)
 }
 
 /* Perform I/O control on an active ax25 channel. */
-static int mkiss_ioctl(struct tty_struct *tty, struct file *file,
-	unsigned int cmd, unsigned long arg)
+static int mkiss_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	struct mkiss *ax = mkiss_get(tty);
 	struct net_device *dev;
diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index f4429b93a9c8..15a179631903 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -281,8 +281,7 @@ ppp_asynctty_write(struct tty_struct *tty, struct file *file,
  */
 
 static int
-ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
-		   unsigned int cmd, unsigned long arg)
+ppp_asynctty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
 {
 	struct asyncppp *ap = ap_get(tty);
 	int err, val;
diff --git a/drivers/net/ppp/ppp_synctty.c b/drivers/net/ppp/ppp_synctty.c
index b3a71b409a80..18283b7b94bc 100644
--- a/drivers/net/ppp/ppp_synctty.c
+++ b/drivers/net/ppp/ppp_synctty.c
@@ -274,8 +274,7 @@ ppp_sync_write(struct tty_struct *tty, struct file *file,
 }
 
 static int
-ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
-		  unsigned int cmd, unsigned long arg)
+ppp_synctty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg)
 {
 	struct syncppp *ap = sp_get(tty);
 	int __user *p = (int __user *)arg;
diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c
index 9f3b4c1aa5ce..98f586f910fb 100644
--- a/drivers/net/slip/slip.c
+++ b/drivers/net/slip/slip.c
@@ -1072,8 +1072,8 @@ static void slip_unesc6(struct slip *sl, unsigned char s)
 #endif /* CONFIG_SLIP_MODE_SLIP6 */
 
 /* Perform I/O control on an active SLIP channel. */
-static int slip_ioctl(struct tty_struct *tty, struct file *file,
-					unsigned int cmd, unsigned long arg)
+static int slip_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	struct slip *sl = tty->disc_data;
 	unsigned int tmp;
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 03a98c93006a..59bbd4f6a610 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -2630,8 +2630,8 @@ static __poll_t gsmld_poll(struct tty_struct *tty, struct file *file,
 	return mask;
 }
 
-static int gsmld_ioctl(struct tty_struct *tty, struct file *file,
-		       unsigned int cmd, unsigned long arg)
+static int gsmld_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	struct gsm_config c;
 	struct gsm_mux *gsm = tty->disc_data;
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index 7e0884ecc74f..7fdbae81bf1d 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -572,14 +572,13 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 /**
  * n_hdlc_tty_ioctl - process IOCTL system call for the tty device.
  * @tty: pointer to tty instance data
- * @file: pointer to open file object for device
  * @cmd: IOCTL command code
  * @arg: argument for IOCTL call (cmd dependent)
  *
  * Returns command dependent result.
  */
-static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
-			    unsigned int cmd, unsigned long arg)
+static int n_hdlc_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	struct n_hdlc *n_hdlc = tty->disc_data;
 	int error = 0;
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 9fc2319a394d..011ce4a2a01a 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -2400,8 +2400,8 @@ static unsigned long inq_canon(struct n_tty_data *ldata)
 	return nr;
 }
 
-static int n_tty_ioctl(struct tty_struct *tty, struct file *file,
-		       unsigned int cmd, unsigned long arg)
+static int n_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	struct n_tty_data *ldata = tty->disc_data;
 	int retval;
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 6616d4a0d41d..2f1bf1bb7710 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2811,7 +2811,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		return hung_up_tty_ioctl(file, cmd, arg);
 	retval = -EINVAL;
 	if (ld->ops->ioctl) {
-		retval = ld->ops->ioctl(tty, file, cmd, arg);
+		retval = ld->ops->ioctl(tty, cmd, arg);
 		if (retval == -ENOIOCTLCMD)
 			retval = -ENOTTY;
 	}
@@ -2990,10 +2990,10 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd,
 	if (!ld)
 		return hung_up_tty_compat_ioctl(file, cmd, arg);
 	if (ld->ops->compat_ioctl)
-		retval = ld->ops->compat_ioctl(tty, file, cmd, arg);
+		retval = ld->ops->compat_ioctl(tty, cmd, arg);
 	if (retval == -ENOIOCTLCMD && ld->ops->ioctl)
-		retval = ld->ops->ioctl(tty, file,
-				(unsigned long)compat_ptr(cmd), arg);
+		retval = ld->ops->ioctl(tty, (unsigned long)compat_ptr(cmd),
+				arg);
 	tty_ldisc_deref(ld);
 
 	return retval;
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index b85d84fb5f49..25f07017bbad 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -45,8 +45,7 @@ struct tty_struct;
  *	some processing on the characters first.  If this function is
  *	not defined, the user will receive an EIO error.
  *
- * int	(*ioctl)(struct tty_struct * tty, struct file * file,
- *		 unsigned int cmd, unsigned long arg);
+ * int	(*ioctl)(struct tty_struct *tty, unsigned int cmd, unsigned long arg);
  *
  *	This function is called when the user requests an ioctl which
  *	is not handled by the tty layer or the low-level tty driver.
@@ -56,8 +55,8 @@ struct tty_struct;
  *	low-level driver can "grab" an ioctl request before the line
  *	discpline has a chance to see it.
  *
- * int	(*compat_ioctl)(struct tty_struct * tty, struct file * file,
- *		        unsigned int cmd, unsigned long arg);
+ * int	(*compat_ioctl)(struct tty_struct *tty, unsigned int cmd,
+ *			unsigned long arg);
  *
  *	Process ioctl calls from 32-bit process on 64-bit system
  *
@@ -192,10 +191,10 @@ struct tty_ldisc_ops {
 			void **cookie, unsigned long offset);
 	ssize_t	(*write)(struct tty_struct *tty, struct file *file,
 			 const unsigned char *buf, size_t nr);
-	int	(*ioctl)(struct tty_struct *tty, struct file *file,
-			 unsigned int cmd, unsigned long arg);
-	int	(*compat_ioctl)(struct tty_struct *tty, struct file *file,
-				unsigned int cmd, unsigned long arg);
+	int	(*ioctl)(struct tty_struct *tty, unsigned int cmd,
+			unsigned long arg);
+	int	(*compat_ioctl)(struct tty_struct *tty, unsigned int cmd,
+			unsigned long arg);
 	void	(*set_termios)(struct tty_struct *tty, struct ktermios *old);
 	__poll_t (*poll)(struct tty_struct *, struct file *,
 			     struct poll_table_struct *);
diff --git a/net/nfc/nci/uart.c b/net/nfc/nci/uart.c
index 9bdd9a7d187e..17e29c8b28de 100644
--- a/net/nfc/nci/uart.c
+++ b/net/nfc/nci/uart.c
@@ -329,14 +329,13 @@ static void nci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
  * Arguments:
  *
  *    tty        pointer to tty instance data
- *    file       pointer to open file object for device
  *    cmd        IOCTL command code
  *    arg        argument for IOCTL call (cmd dependent)
  *
  * Return Value:    Command dependent
  */
-static int nci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
-			      unsigned int cmd, unsigned long arg)
+static int nci_uart_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
+		unsigned long arg)
 {
 	struct nci_uart *nu = (void *)tty->disc_data;
 	int err = 0;
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:11 [PATCH 01/16] tty: unexport tty_ldisc_release Jiri Slaby
                   ` (5 preceding siblings ...)
  2021-09-14  9:11 ` [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl Jiri Slaby
@ 2021-09-14  9:14 ` Jiri Slaby
  2021-09-14  9:14   ` [PATCH 09/16] tty: drivers/tty/, " Jiri Slaby
                     ` (18 more replies)
  6 siblings, 19 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:14 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, Joel Stanley,
	Andrew Jeffery, Al Cooper, Matthias Brugger, Tobias Klauser,
	Russell King, Vineet Gupta, Richard Genoud, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Florian Fainelli,
	bcm-kernel-feedback-list, Alexander Shiyan, Baruch Siach,
	Maciej W. Rozycki, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Karol Gugala, Mateusz Holenko, Vladimir Zapolskiy,
	Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Andy Gross,
	Bjorn Andersson, Andreas Färber, Manivannan Sadhasivam,
	Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
	Kevin Cernekee, Krzysztof Kozlowski, Laxman Dewangan,
	Thierry Reding, Jonathan Hunter, Palmer Dabbelt, Paul Walmsley,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Patrice Chotard,
	Maxime Coquelin, Alexandre Torgue, David S. Miller,
	Peter Korsgaard, Timur Tabi, Michal Simek

Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the former, so call the latter directly in
drivers/tty/serial/.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@aj.id.au>
Cc: Al Cooper <alcooperx@gmail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Tobias Klauser <tklauser@distanz.ch>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Vineet Gupta <vgupta@kernel.org>
Cc: Richard Genoud <richard.genoud@gmail.com>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Karol Gugala <kgugala@antmicro.com>
Cc: Mateusz Holenko <mholenko@antmicro.com>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: "Andreas Färber" <afaerber@suse.de>
Cc: Manivannan Sadhasivam <mani@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Orson Zhai <orsonzhai@gmail.com>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Timur Tabi <timur@kernel.org>
Cc: Michal Simek <michal.simek@xilinx.com>
---
 drivers/tty/serial/21285.c                  |  2 +-
 drivers/tty/serial/8250/8250_aspeed_vuart.c |  2 +-
 drivers/tty/serial/8250/8250_bcm7271.c      |  2 +-
 drivers/tty/serial/8250/8250_dma.c          |  2 +-
 drivers/tty/serial/8250/8250_mtk.c          |  2 +-
 drivers/tty/serial/8250/8250_omap.c         |  2 +-
 drivers/tty/serial/8250/8250_port.c         |  2 +-
 drivers/tty/serial/altera_jtaguart.c        |  2 +-
 drivers/tty/serial/altera_uart.c            |  2 +-
 drivers/tty/serial/amba-pl010.c             |  2 +-
 drivers/tty/serial/amba-pl011.c             |  6 +++---
 drivers/tty/serial/apbuart.c                |  2 +-
 drivers/tty/serial/ar933x_uart.c            |  2 +-
 drivers/tty/serial/arc_uart.c               |  2 +-
 drivers/tty/serial/atmel_serial.c           |  6 +++---
 drivers/tty/serial/bcm63xx_uart.c           |  2 +-
 drivers/tty/serial/clps711x.c               |  2 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c |  2 +-
 drivers/tty/serial/digicolor-usart.c        |  2 +-
 drivers/tty/serial/dz.c                     |  2 +-
 drivers/tty/serial/fsl_linflexuart.c        |  2 +-
 drivers/tty/serial/fsl_lpuart.c             |  6 +++---
 drivers/tty/serial/icom.c                   |  2 +-
 drivers/tty/serial/imx.c                    |  6 +++---
 drivers/tty/serial/ip22zilog.c              |  4 ++--
 drivers/tty/serial/jsm/jsm_tty.c            |  2 +-
 drivers/tty/serial/kgdb_nmi.c               |  2 +-
 drivers/tty/serial/lantiq.c                 |  4 ++--
 drivers/tty/serial/liteuart.c               |  2 +-
 drivers/tty/serial/lpc32xx_hs.c             |  2 +-
 drivers/tty/serial/max3100.c                |  4 ++--
 drivers/tty/serial/max310x.c                |  2 +-
 drivers/tty/serial/mcf.c                    |  2 +-
 drivers/tty/serial/men_z135_uart.c          |  2 +-
 drivers/tty/serial/meson_uart.c             |  2 +-
 drivers/tty/serial/milbeaut_usio.c          |  2 +-
 drivers/tty/serial/mpc52xx_uart.c           |  2 +-
 drivers/tty/serial/mps2-uart.c              |  4 ++--
 drivers/tty/serial/msm_serial.c             |  6 +++---
 drivers/tty/serial/mux.c                    |  2 +-
 drivers/tty/serial/mvebu-uart.c             |  2 +-
 drivers/tty/serial/mxs-auart.c              |  4 ++--
 drivers/tty/serial/omap-serial.c            |  2 +-
 drivers/tty/serial/owl-uart.c               |  2 +-
 drivers/tty/serial/pch_uart.c               |  4 ++--
 drivers/tty/serial/pic32_uart.c             |  2 +-
 drivers/tty/serial/pmac_zilog.c             |  4 ++--
 drivers/tty/serial/pxa.c                    |  2 +-
 drivers/tty/serial/qcom_geni_serial.c       |  4 ++--
 drivers/tty/serial/rda-uart.c               |  2 +-
 drivers/tty/serial/rp2.c                    |  2 +-
 drivers/tty/serial/sa1100.c                 |  2 +-
 drivers/tty/serial/samsung_tty.c            |  6 +++---
 drivers/tty/serial/sb1250-duart.c           |  2 +-
 drivers/tty/serial/sc16is7xx.c              |  2 +-
 drivers/tty/serial/sccnxp.c                 |  2 +-
 drivers/tty/serial/serial-tegra.c           |  2 +-
 drivers/tty/serial/serial_core.c            |  2 +-
 drivers/tty/serial/serial_txx9.c            |  2 +-
 drivers/tty/serial/sh-sci.c                 | 12 ++++++------
 drivers/tty/serial/sifive.c                 |  2 +-
 drivers/tty/serial/sprd_serial.c            |  4 ++--
 drivers/tty/serial/st-asc.c                 |  2 +-
 drivers/tty/serial/stm32-usart.c            |  2 +-
 drivers/tty/serial/sunhv.c                  |  2 +-
 drivers/tty/serial/sunsab.c                 |  2 +-
 drivers/tty/serial/sunsu.c                  |  2 +-
 drivers/tty/serial/sunzilog.c               |  4 ++--
 drivers/tty/serial/tegra-tcu.c              |  2 +-
 drivers/tty/serial/timbuart.c               |  2 +-
 drivers/tty/serial/uartlite.c               |  2 +-
 drivers/tty/serial/ucc_uart.c               |  2 +-
 drivers/tty/serial/vr41xx_siu.c             |  2 +-
 drivers/tty/serial/vt8500_serial.c          |  2 +-
 drivers/tty/serial/xilinx_uartps.c          |  2 +-
 drivers/tty/serial/zs.c                     |  2 +-
 76 files changed, 103 insertions(+), 103 deletions(-)

diff --git a/drivers/tty/serial/21285.c b/drivers/tty/serial/21285.c
index 09baef4ccc39..6a5e86f6b363 100644
--- a/drivers/tty/serial/21285.c
+++ b/drivers/tty/serial/21285.c
@@ -146,7 +146,7 @@ static irqreturn_t serial21285_rx_chars(int irq, void *dev_id)
 
 		status = *CSR_UARTFLG;
 	}
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/tty/serial/8250/8250_aspeed_vuart.c b/drivers/tty/serial/8250/8250_aspeed_vuart.c
index 2350fb3bb5e4..b5abe2d4cd74 100644
--- a/drivers/tty/serial/8250/8250_aspeed_vuart.c
+++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c
@@ -363,7 +363,7 @@ static int aspeed_vuart_handle_irq(struct uart_port *port)
 					break;
 			} while (lsr & (UART_LSR_DR | UART_LSR_BI));
 
-			tty_flip_buffer_push(&port->state->port);
+			tty_schedule_flip(&port->state->port);
 		}
 	}
 
diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c
index 7f656fac503f..82c6c4490460 100644
--- a/drivers/tty/serial/8250/8250_bcm7271.c
+++ b/drivers/tty/serial/8250/8250_bcm7271.c
@@ -493,7 +493,7 @@ static void brcmuart_rx_buf_done_isr(struct uart_port *up, int index)
 	else
 		priv->dma_rx_full_buf++;
 
-	tty_flip_buffer_push(tty_port);
+	tty_schedule_flip(tty_port);
 }
 
 static void brcmuart_rx_isr(struct uart_port *up, u32 rx_isr)
diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index 890fa7ddaa7f..037d71eb3662 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -56,7 +56,7 @@ static void __dma_rx_complete(void *param)
 	tty_insert_flip_string(tty_port, dma->rx_buf, count);
 	p->port.icount.rx += count;
 
-	tty_flip_buffer_push(tty_port);
+	tty_schedule_flip(tty_port);
 }
 
 int serial8250_tx_dma(struct uart_8250_port *p)
diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
index fb65dc601b23..905be8b79cfd 100644
--- a/drivers/tty/serial/8250/8250_mtk.c
+++ b/drivers/tty/serial/8250/8250_mtk.c
@@ -120,7 +120,7 @@ static void mtk8250_dma_rx_complete(void *param)
 
 	up->port.icount.rx += copied;
 
-	tty_flip_buffer_push(tty_port);
+	tty_schedule_flip(tty_port);
 
 	mtk8250_rx_dma(up);
 
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 891fd8345e25..29d22b6f18da 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -861,7 +861,7 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
 	p->port.icount.buf_overrun += count - ret;
 out:
 
-	tty_flip_buffer_push(tty_port);
+	tty_schedule_flip(tty_port);
 }
 
 static void __dma_rx_complete(void *param)
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 66374704747e..278379732082 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1787,7 +1787,7 @@ unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr)
 		lsr = serial_in(up, UART_LSR);
 	} while (lsr & (UART_LSR_DR | UART_LSR_BI));
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 	return lsr;
 }
 EXPORT_SYMBOL_GPL(serial8250_rx_chars);
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 23c4e0e79694..980d81943ce1 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -131,7 +131,7 @@ static void altera_jtaguart_rx_chars(struct altera_jtaguart *pp)
 		uart_insert_char(port, 0, 0, ch, flag);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static void altera_jtaguart_tx_chars(struct altera_jtaguart *pp)
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index 7c5f4e966b59..c9805c980066 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -243,7 +243,7 @@ static void altera_uart_rx_chars(struct altera_uart *pp)
 				 flag);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static void altera_uart_tx_chars(struct altera_uart *pp)
diff --git a/drivers/tty/serial/amba-pl010.c b/drivers/tty/serial/amba-pl010.c
index e744b953ca34..d8072f9e6699 100644
--- a/drivers/tty/serial/amba-pl010.c
+++ b/drivers/tty/serial/amba-pl010.c
@@ -159,7 +159,7 @@ static void pl010_rx_chars(struct uart_amba_port *uap)
 	ignore_char:
 		status = readb(uap->port.membase + UART01x_FR);
 	}
-	tty_flip_buffer_push(&uap->port.state->port);
+	tty_schedule_flip(&uap->port.state->port);
 }
 
 static void pl010_tx_chars(struct uart_amba_port *uap)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index d361cd84ff8c..3e9678bf8c97 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -944,7 +944,7 @@ static void pl011_dma_rx_chars(struct uart_amba_port *uap,
 	dev_vdbg(uap->port.dev,
 		 "Took %d chars from DMA buffer and %d chars from the FIFO\n",
 		 dma_count, fifotaken);
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 }
 
 static void pl011_dma_rx_irq(struct uart_amba_port *uap)
@@ -1084,7 +1084,7 @@ static void pl011_dma_rx_poll(struct timer_list *t)
 			dmarx->last_residue =  state.residue;
 		dmarx->last_jiffies = jiffies;
 	}
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 
 	/*
 	 * If no data is received in poll_timeout, the driver will fall back
@@ -1383,7 +1383,7 @@ __acquires(&uap->port.lock)
 	pl011_fifo_to_tty(uap);
 
 	spin_unlock(&uap->port.lock);
-	tty_flip_buffer_push(&uap->port.state->port);
+	tty_schedule_flip(&uap->port.state->port);
 	/*
 	 * If we were temporarily out of DMA mode for a while,
 	 * attempt to switch back to DMA mode again.
diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c
index d8c937bdf3f9..0e94314f5d7f 100644
--- a/drivers/tty/serial/apbuart.c
+++ b/drivers/tty/serial/apbuart.c
@@ -117,7 +117,7 @@ static void apbuart_rx_chars(struct uart_port *port)
 		status = UART_GET_STATUS(port);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static void apbuart_tx_chars(struct uart_port *port)
diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c
index 4379ca4842ae..daccf86aaeb7 100644
--- a/drivers/tty/serial/ar933x_uart.c
+++ b/drivers/tty/serial/ar933x_uart.c
@@ -385,7 +385,7 @@ static void ar933x_uart_rx_chars(struct ar933x_uart_port *up)
 			tty_insert_flip_char(port, ch, TTY_NORMAL);
 	} while (max_count-- > 0);
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 }
 
 static void ar933x_uart_tx_chars(struct ar933x_uart_port *up)
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index 596217d10d5c..01b6851fec54 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -236,7 +236,7 @@ static void arc_serial_rx_chars(struct uart_port *port, unsigned int status)
 		if (!(uart_handle_sysrq_char(port, ch)))
 			uart_insert_char(port, status, RXOERR, ch, flg);
 
-		tty_flip_buffer_push(&port->state->port);
+		tty_schedule_flip(&port->state->port);
 	} while (!((status = UART_GET_STATUS(port)) & RXEMPTY));
 }
 
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 249ea35088d2..8f80d812a320 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1178,7 +1178,7 @@ static void atmel_rx_from_dma(struct uart_port *port)
 			       1,
 			       DMA_FROM_DEVICE);
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 
 	atmel_uart_writel(port, ATMEL_US_IER, ATMEL_US_TIMEOUT);
 }
@@ -1570,7 +1570,7 @@ static void atmel_rx_from_ring(struct uart_port *port)
 		uart_insert_char(port, status, ATMEL_US_OVRE, c.ch, flg);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static void atmel_release_rx_pdc(struct uart_port *port)
@@ -1655,7 +1655,7 @@ static void atmel_rx_from_pdc(struct uart_port *port)
 		}
 	} while (head >= pdc->dma_size);
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 
 	atmel_uart_writel(port, ATMEL_US_IER,
 			  ATMEL_US_ENDRX | ATMEL_US_TIMEOUT);
diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index 5fb0e84f7fd1..0e884ea05ac5 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -294,7 +294,7 @@ static void bcm_uart_do_rx(struct uart_port *port)
 
 	} while (--max_count);
 
-	tty_flip_buffer_push(tty_port);
+	tty_schedule_flip(tty_port);
 }
 
 /*
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c
index 95abc6faa3d5..09c280c28636 100644
--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -136,7 +136,7 @@ static irqreturn_t uart_clps711x_int_rx(int irq, void *dev_id)
 		uart_insert_char(port, status, UARTDR_OVERR, ch, flg);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
index c719aa2b1832..f8efddba2160 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
@@ -305,7 +305,7 @@ static void cpm_uart_int_rx(struct uart_port *port)
 	pinfo->rx_cur = bdp;
 
 	/* activate BH processing */
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 
 	return;
 
diff --git a/drivers/tty/serial/digicolor-usart.c b/drivers/tty/serial/digicolor-usart.c
index 13ac36e2da4f..0f9032e8d5be 100644
--- a/drivers/tty/serial/digicolor-usart.c
+++ b/drivers/tty/serial/digicolor-usart.c
@@ -175,7 +175,7 @@ static void digicolor_uart_rx(struct uart_port *port)
 
 	spin_unlock_irqrestore(&port->lock, flags);
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static void digicolor_uart_tx(struct uart_port *port)
diff --git a/drivers/tty/serial/dz.c b/drivers/tty/serial/dz.c
index e9edabc5a211..8f74ab71f3e2 100644
--- a/drivers/tty/serial/dz.c
+++ b/drivers/tty/serial/dz.c
@@ -239,7 +239,7 @@ static inline void dz_receive_chars(struct dz_mux *mux)
 	}
 	for (i = 0; i < DZ_NB_PORT; i++)
 		if (lines_rx[i])
-			tty_flip_buffer_push(&mux->dport[i].port.state->port);
+			tty_schedule_flip(&mux->dport[i].port.state->port);
 }
 
 /*
diff --git a/drivers/tty/serial/fsl_linflexuart.c b/drivers/tty/serial/fsl_linflexuart.c
index 283757264608..759558641c23 100644
--- a/drivers/tty/serial/fsl_linflexuart.c
+++ b/drivers/tty/serial/fsl_linflexuart.c
@@ -281,7 +281,7 @@ static irqreturn_t linflex_rxint(int irq, void *dev_id)
 
 	spin_unlock_irqrestore(&sport->lock, flags);
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index b1e7190ae483..6e0733f8a326 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -941,7 +941,7 @@ static void lpuart_rxint(struct lpuart_port *sport)
 
 	uart_unlock_and_check_sysrq(&sport->port);
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 }
 
 static void lpuart32_txint(struct lpuart_port *sport)
@@ -1023,7 +1023,7 @@ static void lpuart32_rxint(struct lpuart_port *sport)
 out:
 	uart_unlock_and_check_sysrq(&sport->port);
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 }
 
 static irqreturn_t lpuart_int(int irq, void *dev_id)
@@ -1233,7 +1233,7 @@ static void lpuart_copy_rx_to_tty(struct lpuart_port *sport)
 
 	spin_unlock_irqrestore(&sport->port.lock, flags);
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 	mod_timer(&sport->lpuart_timer, jiffies + sport->dma_rx_timeout);
 }
 
diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
index 03a2fe9f4c9a..061b824f9612 100644
--- a/drivers/tty/serial/icom.c
+++ b/drivers/tty/serial/icom.c
@@ -829,7 +829,7 @@ static void recv_interrupt(u16 port_int_reg, struct icom_port *icom_port)
 	}
 	icom_port->next_rcv = rcv_buff;
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 }
 
 static void process_interrupt(u16 port_int_reg,
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 8b121cd869e9..cae87199ef5c 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -844,7 +844,7 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id)
 	}
 
 out:
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 
 	return IRQ_HANDLED;
 }
@@ -1180,7 +1180,7 @@ static void imx_uart_dma_rx_callback(void *data)
 	}
 
 	if (w_bytes) {
-		tty_flip_buffer_push(port);
+		tty_schedule_flip(port);
 		dev_dbg(sport->port.dev, "We get %d bytes.\n", w_bytes);
 	}
 }
@@ -1236,7 +1236,7 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport)
 		uart_handle_break(&sport->port);
 		if (tty_insert_flip_char(port, 0, TTY_BREAK) == 0)
 			sport->port.icount.buf_overrun++;
-		tty_flip_buffer_push(port);
+		tty_schedule_flip(port);
 	} else {
 		if (usr1 & USR1_FRAMERR) {
 			sport->port.icount.frame++;
diff --git a/drivers/tty/serial/ip22zilog.c b/drivers/tty/serial/ip22zilog.c
index f4dc5fe4ba92..00f1b5815a58 100644
--- a/drivers/tty/serial/ip22zilog.c
+++ b/drivers/tty/serial/ip22zilog.c
@@ -452,7 +452,7 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id)
 		spin_unlock(&up->port.lock);
 
 		if (push)
-			tty_flip_buffer_push(&up->port.state->port);
+			tty_schedule_flip(&up->port.state->port);
 
 		/* Channel B */
 		up = up->next;
@@ -475,7 +475,7 @@ static irqreturn_t ip22zilog_interrupt(int irq, void *dev_id)
 		spin_unlock(&up->port.lock);
 
 		if (push)
-			tty_flip_buffer_push(&up->port.state->port);
+			tty_schedule_flip(&up->port.state->port);
 
 		up = up->next;
 	}
diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index d74cbbbf33c6..62baad9e13c8 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -638,7 +638,7 @@ void jsm_input(struct jsm_channel *ch)
 	spin_unlock_irqrestore(&ch->ch_lock, lock_flags);
 
 	/* Tell the tty layer its okay to "eat" the data now */
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 
 	jsm_dbg(IOCTL, &ch->ch_bd->pci_dev, "finish\n");
 }
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
index 55c3c9db7462..77308f4e5b8f 100644
--- a/drivers/tty/serial/kgdb_nmi.c
+++ b/drivers/tty/serial/kgdb_nmi.c
@@ -202,7 +202,7 @@ static void kgdb_nmi_tty_receiver(struct timer_list *t)
 
 	while (kfifo_out(&priv->fifo, &ch, 1))
 		tty_insert_flip_char(&priv->port, ch, TTY_NORMAL);
-	tty_flip_buffer_push(&priv->port);
+	tty_schedule_flip(&priv->port);
 }
 
 static int kgdb_nmi_tty_activate(struct tty_port *port, struct tty_struct *tty)
diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index 497b334bc845..020e3ca72c8e 100644
--- a/drivers/tty/serial/lantiq.c
+++ b/drivers/tty/serial/lantiq.c
@@ -172,7 +172,7 @@ lqasc_rx_chars(struct uart_port *port)
 		ch = readb(port->membase + LTQ_ASC_RBUF);
 		rsr = (__raw_readl(port->membase + LTQ_ASC_STATE)
 			& ASCSTATE_ANY) | UART_DUMMY_UER_RX;
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 		port->icount.rx++;
 
 		/*
@@ -216,7 +216,7 @@ lqasc_rx_chars(struct uart_port *port)
 	}
 
 	if (ch != 0)
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 
 	return 0;
 }
diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c
index dbc0559a9157..86a64b48c1e7 100644
--- a/drivers/tty/serial/liteuart.c
+++ b/drivers/tty/serial/liteuart.c
@@ -87,7 +87,7 @@ static void liteuart_timer(struct timer_list *t)
 		if (!(uart_handle_sysrq_char(port, ch)))
 			uart_insert_char(port, status, 0, ch, flg);
 
-		tty_flip_buffer_push(&port->state->port);
+		tty_schedule_flip(&port->state->port);
 	}
 
 	mod_timer(&uart->timer, jiffies + uart_poll_timeout(port));
diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c
index b199d7859961..1c90a5a1566e 100644
--- a/drivers/tty/serial/lpc32xx_hs.c
+++ b/drivers/tty/serial/lpc32xx_hs.c
@@ -273,7 +273,7 @@ static void __serial_lpc32xx_rx(struct uart_port *port)
 		tmp = readl(LPC32XX_HSUART_FIFO(port->membase));
 	}
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 }
 
 static void __serial_lpc32xx_tx(struct uart_port *port)
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index 3c92d4e01488..f9ade20bff71 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -305,7 +305,7 @@ static void max3100_work(struct work_struct *w)
 		}
 
 		if (rxchars > 16) {
-			tty_flip_buffer_push(&s->port.state->port);
+			tty_schedule_flip(&s->port.state->port);
 			rxchars = 0;
 		}
 		if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
@@ -318,7 +318,7 @@ static void max3100_work(struct work_struct *w)
 		   !uart_tx_stopped(&s->port))));
 
 	if (rxchars > 0)
-		tty_flip_buffer_push(&s->port.state->port);
+		tty_schedule_flip(&s->port.state->port);
 }
 
 static irqreturn_t max3100_irq(int irqno, void *dev_id)
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 3df0788ddeb0..0c689c23894b 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -742,7 +742,7 @@ static void max310x_handle_rx(struct uart_port *port, unsigned int rxlen)
 		}
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static void max310x_handle_tx(struct uart_port *port)
diff --git a/drivers/tty/serial/mcf.c b/drivers/tty/serial/mcf.c
index c7cec7d03620..7f651b9fb005 100644
--- a/drivers/tty/serial/mcf.c
+++ b/drivers/tty/serial/mcf.c
@@ -319,7 +319,7 @@ static void mcf_rx_chars(struct mcf_uart *pp)
 		uart_insert_char(port, status, MCFUART_USR_RXOVERRUN, ch, flag);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 /****************************************************************************/
diff --git a/drivers/tty/serial/men_z135_uart.c b/drivers/tty/serial/men_z135_uart.c
index 9acae5f8fc32..17ce27a60dcb 100644
--- a/drivers/tty/serial/men_z135_uart.c
+++ b/drivers/tty/serial/men_z135_uart.c
@@ -281,7 +281,7 @@ static void men_z135_handle_rx(struct men_z135_port *uart)
 
 	port->icount.rx += copied;
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 
 }
 
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index efee3935917f..6a4200f493e0 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -226,7 +226,7 @@ static void meson_receive_chars(struct uart_port *port)
 
 	} while (!(readl(port->membase + AML_UART_STATUS) & AML_UART_RX_EMPTY));
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 }
 
 static irqreturn_t meson_uart_interrupt(int irq, void *dev_id)
diff --git a/drivers/tty/serial/milbeaut_usio.c b/drivers/tty/serial/milbeaut_usio.c
index 8f2cab7f66ad..27f7ae7cf44f 100644
--- a/drivers/tty/serial/milbeaut_usio.c
+++ b/drivers/tty/serial/milbeaut_usio.c
@@ -202,7 +202,7 @@ static void mlb_usio_rx_chars(struct uart_port *port)
 		port->membase + MLB_USIO_REG_FCR);
 	}
 
-	tty_flip_buffer_push(ttyport);
+	tty_schedule_flip(ttyport);
 }
 
 static irqreturn_t mlb_usio_rx_irq(int irq, void *dev_id)
diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
index 2704dc988e4a..ae63f3595c15 100644
--- a/drivers/tty/serial/mpc52xx_uart.c
+++ b/drivers/tty/serial/mpc52xx_uart.c
@@ -1421,7 +1421,7 @@ mpc52xx_uart_int_rx_chars(struct uart_port *port)
 		}
 	}
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 
 	return psc_ops->raw_rx_rdy(port);
 }
diff --git a/drivers/tty/serial/mps2-uart.c b/drivers/tty/serial/mps2-uart.c
index 587b42f754cb..fd3e534b8d96 100644
--- a/drivers/tty/serial/mps2-uart.c
+++ b/drivers/tty/serial/mps2-uart.c
@@ -196,7 +196,7 @@ static void mps2_uart_rx_chars(struct uart_port *port)
 		tty_insert_flip_char(&port->state->port, rxdata, TTY_NORMAL);
 	}
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 }
 
 static irqreturn_t mps2_uart_rxirq(int irq, void *data)
@@ -249,7 +249,7 @@ static irqreturn_t mps2_uart_oerrirq(int irq, void *data)
 		mps2_uart_write8(port, UARTn_INT_RX_OVERRUN, UARTn_INT);
 		port->icount.overrun++;
 		tty_insert_flip_char(tport, 0, TTY_OVERRUN);
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 		handled = IRQ_HANDLED;
 	}
 
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index fcef7a961430..de6c0254bb3e 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -588,7 +588,7 @@ static void msm_complete_rx_dma(void *args)
 	spin_unlock_irqrestore(&port->lock, flags);
 
 	if (count)
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 }
 
 static void msm_start_rx_dma(struct msm_port *msm_port)
@@ -757,7 +757,7 @@ static void msm_handle_rx_dm(struct uart_port *port, unsigned int misr)
 		count -= r_count;
 	}
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 
 	if (misr & (UART_IMR_RXSTALE))
 		msm_write(port, UART_CR_CMD_RESET_STALE_INT, UART_CR);
@@ -817,7 +817,7 @@ static void msm_handle_rx(struct uart_port *port)
 			tty_insert_flip_char(tport, c, flag);
 	}
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 }
 
 static void msm_handle_tx_pio(struct uart_port *port, unsigned int tx_count)
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c
index 643dfbcc43f9..5aedfe8d0481 100644
--- a/drivers/tty/serial/mux.c
+++ b/drivers/tty/serial/mux.c
@@ -252,7 +252,7 @@ static void mux_read(struct uart_port *port)
 	}
 	
 	if (start_count != port->icount.rx)
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 }
 
 /**
diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
index 231de29a6452..5fd54e27243b 100644
--- a/drivers/tty/serial/mvebu-uart.c
+++ b/drivers/tty/serial/mvebu-uart.c
@@ -291,7 +291,7 @@ static void mvebu_uart_rx_chars(struct uart_port *port, unsigned int status)
 		status = readl(port->membase + UART_STAT);
 	} while (status & (STAT_RX_RDY(port) | STAT_BRK_DET));
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 }
 
 static void mvebu_uart_tx_chars(struct uart_port *port, unsigned int status)
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index ac45f3386e97..fd0bb7db8084 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -687,7 +687,7 @@ static void mxs_auart_rx_chars(struct mxs_auart_port *s)
 	}
 
 	mxs_write(stat, s, REG_STAT);
-	tty_flip_buffer_push(&s->port.state->port);
+	tty_schedule_flip(&s->port.state->port);
 }
 
 static int mxs_auart_request_port(struct uart_port *u)
@@ -848,7 +848,7 @@ static void dma_rx_callback(void *arg)
 	tty_insert_flip_string(port, s->rx_dma_buf, count);
 
 	mxs_write(stat, s, REG_STAT);
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 
 	/* start the next DMA for RX. */
 	mxs_auart_dma_prep_rx(s);
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 0862941862c8..51b666604229 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -592,7 +592,7 @@ static irqreturn_t serial_omap_irq(int irq, void *dev_id)
 
 	spin_unlock(&up->port.lock);
 
-	tty_flip_buffer_push(&up->port.state->port);
+	tty_schedule_flip(&up->port.state->port);
 
 	up->port_activity = jiffies;
 
diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl-uart.c
index 91f1eb0058d7..10b6cfc37b2e 100644
--- a/drivers/tty/serial/owl-uart.c
+++ b/drivers/tty/serial/owl-uart.c
@@ -247,7 +247,7 @@ static void owl_uart_receive_chars(struct uart_port *port)
 		stat = owl_uart_read(port, OWL_UART_STAT);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static irqreturn_t owl_uart_irq(int irq, void *dev_id)
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index f0351e6f0ef6..b281130dc800 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -619,7 +619,7 @@ static int push_rx(struct eg20t_port *priv, const unsigned char *buf,
 	struct tty_port *tport = &port->state->port;
 
 	tty_insert_flip_string(tport, buf, size);
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 
 	return 0;
 }
@@ -757,7 +757,7 @@ static void pch_dma_rx_complete(void *arg)
 	dma_sync_sg_for_cpu(port->dev, &priv->sg_rx, 1, DMA_FROM_DEVICE);
 	count = dma_push_rx(priv, priv->trigger_level);
 	if (count)
-		tty_flip_buffer_push(&port->state->port);
+		tty_schedule_flip(&port->state->port);
 	async_tx_ack(priv->desc_rx);
 	pch_uart_hal_enable_interrupt(priv, PCH_UART_HAL_RX_INT |
 					    PCH_UART_HAL_RX_ERR_INT);
diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c
index 0a12fb11e698..8525b418f960 100644
--- a/drivers/tty/serial/pic32_uart.c
+++ b/drivers/tty/serial/pic32_uart.c
@@ -268,7 +268,7 @@ static void pic32_uart_do_rx(struct uart_port *port)
 
 	spin_unlock(&port->lock);
 
-	tty_flip_buffer_push(tty);
+	tty_schedule_flip(tty);
 }
 
 /* fill tx fifo with chars to send, stop when fifo is about to be full
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index 12ce150b0ad4..9677a192f829 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -469,7 +469,7 @@ static irqreturn_t pmz_interrupt(int irq, void *dev_id)
  skip_a:
 	spin_unlock(&uap_a->port.lock);
 	if (push)
-		tty_flip_buffer_push(&uap->port.state->port);
+		tty_schedule_flip(&uap->port.state->port);
 
 	if (!uap_b)
 		goto out;
@@ -494,7 +494,7 @@ static irqreturn_t pmz_interrupt(int irq, void *dev_id)
  skip_b:
 	spin_unlock(&uap_b->port.lock);
 	if (push)
-		tty_flip_buffer_push(&uap->port.state->port);
+		tty_schedule_flip(&uap->port.state->port);
 
  out:
 	return rc;
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index 41319ef96fa6..2338be87d760 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -158,7 +158,7 @@ static inline void receive_chars(struct uart_pxa_port *up, int *status)
 	ignore_char:
 		*status = serial_in(up, UART_LSR);
 	} while ((*status & UART_LSR_DR) && (max_count-- > 0));
-	tty_flip_buffer_push(&up->port.state->port);
+	tty_schedule_flip(&up->port.state->port);
 
 	/* work around Errata #20 according to
 	 * Intel(R) PXA27x Processor Family
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index aedc38893e6c..53e8f921565d 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -557,7 +557,7 @@ static int handle_rx_console(struct uart_port *uport, u32 bytes, bool drop)
 		}
 	}
 	if (!drop)
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 	return 0;
 }
 #else
@@ -588,7 +588,7 @@ static int handle_rx_uart(struct uart_port *uport, u32 bytes, bool drop)
 		WARN_ON_ONCE(1);
 	}
 	uport->icount.rx += ret;
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 	return ret;
 }
 
diff --git a/drivers/tty/serial/rda-uart.c b/drivers/tty/serial/rda-uart.c
index d550d8fa2fab..5ee397db4c90 100644
--- a/drivers/tty/serial/rda-uart.c
+++ b/drivers/tty/serial/rda-uart.c
@@ -398,7 +398,7 @@ static void rda_uart_receive_chars(struct uart_port *port)
 		status = rda_uart_read(port, RDA_UART_STATUS);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static irqreturn_t rda_interrupt(int irq, void *dev_id)
diff --git a/drivers/tty/serial/rp2.c b/drivers/tty/serial/rp2.c
index 6689d8add8f7..37fe97e92f88 100644
--- a/drivers/tty/serial/rp2.c
+++ b/drivers/tty/serial/rp2.c
@@ -423,7 +423,7 @@ static void rp2_rx_chars(struct rp2_uart_port *up)
 		up->port.icount.rx++;
 	}
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 }
 
 static void rp2_tx_chars(struct rp2_uart_port *up)
diff --git a/drivers/tty/serial/sa1100.c b/drivers/tty/serial/sa1100.c
index 697b6a002a16..b6adccbec0b7 100644
--- a/drivers/tty/serial/sa1100.c
+++ b/drivers/tty/serial/sa1100.c
@@ -223,7 +223,7 @@ sa1100_rx_chars(struct sa1100_port *sport)
 			 UTSR0_TO_SM(UART_GET_UTSR0(sport));
 	}
 
-	tty_flip_buffer_push(&sport->port.state->port);
+	tty_schedule_flip(&sport->port.state->port);
 }
 
 static void sa1100_tx_chars(struct sa1100_port *sport)
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index e2f49863e9c2..601f1f6719c9 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -627,7 +627,7 @@ static void s3c24xx_serial_rx_dma_complete(void *args)
 		s3c24xx_uart_copy_rx_to_tty(ourport, t, received);
 
 	if (tty) {
-		tty_flip_buffer_push(t);
+		tty_schedule_flip(t);
 		tty_kref_put(tty);
 	}
 
@@ -746,7 +746,7 @@ static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id)
 	s3c24xx_serial_rx_drain_fifo(ourport);
 
 	if (tty) {
-		tty_flip_buffer_push(t);
+		tty_schedule_flip(t);
 		tty_kref_put(tty);
 	}
 
@@ -842,7 +842,7 @@ static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport)
 				 ch, flag);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static irqreturn_t s3c24xx_serial_rx_chars_pio(void *dev_id)
diff --git a/drivers/tty/serial/sb1250-duart.c b/drivers/tty/serial/sb1250-duart.c
index 738df6d9c0d9..0361db9e6708 100644
--- a/drivers/tty/serial/sb1250-duart.c
+++ b/drivers/tty/serial/sb1250-duart.c
@@ -375,7 +375,7 @@ static void sbd_receive_chars(struct sbd_port *sport)
 		uart_insert_char(uport, status, M_DUART_OVRUN_ERR, ch, flag);
 	}
 
-	tty_flip_buffer_push(&uport->state->port);
+	tty_schedule_flip(&uport->state->port);
 }
 
 static void sbd_transmit_chars(struct sbd_port *sport)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index acbb615dd28f..bab7a4cc0a79 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -627,7 +627,7 @@ static void sc16is7xx_handle_rx(struct uart_port *port, unsigned int rxlen,
 		rxlen -= bytes_read;
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static void sc16is7xx_handle_tx(struct uart_port *port)
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c
index 10cc16a71f26..25de6a489217 100644
--- a/drivers/tty/serial/sccnxp.c
+++ b/drivers/tty/serial/sccnxp.c
@@ -434,7 +434,7 @@ static void sccnxp_handle_rx(struct uart_port *port)
 		uart_insert_char(port, sr, SR_OVR, ch, flag);
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 static void sccnxp_handle_tx(struct uart_port *port)
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 45e2e4109acd..700c135c70a9 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -702,7 +702,7 @@ static void do_handle_rx_pio(struct tegra_uart_port *tup)
 
 	tegra_uart_handle_rx_pio(tup, port);
 	if (tty) {
-		tty_flip_buffer_push(port);
+		tty_schedule_flip(port);
 		tty_kref_put(tty);
 	}
 }
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 0e2e35ab64c7..fb38f1cc2a2d 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -3109,7 +3109,7 @@ EXPORT_SYMBOL_GPL(uart_handle_cts_change);
 /**
  * uart_insert_char - push a char to the uart layer
  *
- * User is responsible to call tty_flip_buffer_push when they are done with
+ * User is responsible to call tty_schedule_flip when they are done with
  * insertion.
  *
  * @port: corresponding port
diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c
index aaca4fe38486..dacbfe4aa65a 100644
--- a/drivers/tty/serial/serial_txx9.c
+++ b/drivers/tty/serial/serial_txx9.c
@@ -331,7 +331,7 @@ receive_chars(struct uart_txx9_port *up, unsigned int *status)
 		disr = sio_in(up, TXX9_SIDISR);
 	} while (!(disr & TXX9_SIDISR_UVALID) && (max_count-- > 0));
 
-	tty_flip_buffer_push(&up->port.state->port);
+	tty_schedule_flip(&up->port.state->port);
 
 	*status = disr;
 }
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 785537ceb606..226bebade7ae 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -916,7 +916,7 @@ static void sci_receive_chars(struct uart_port *port)
 
 	if (copied) {
 		/* Tell the rest of the system the news. New characters! */
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 	} else {
 		/* TTY buffers full; read from RX reg to prevent lockup */
 		serial_port_in(port, SCxRDR);
@@ -964,7 +964,7 @@ static int sci_handle_errors(struct uart_port *port)
 	}
 
 	if (copied)
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 
 	return copied;
 }
@@ -989,7 +989,7 @@ static int sci_handle_fifo_overrun(struct uart_port *port)
 		port->icount.overrun++;
 
 		tty_insert_flip_char(tport, 0, TTY_OVERRUN);
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 
 		dev_dbg(port->dev, "overrun error\n");
 		copied++;
@@ -1018,7 +1018,7 @@ static int sci_handle_breaks(struct uart_port *port)
 	}
 
 	if (copied)
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 
 	copied += sci_handle_fifo_overrun(port);
 
@@ -1307,7 +1307,7 @@ static void sci_dma_rx_complete(void *arg)
 	start_hrtimer_us(&s->rx_timer, s->rx_timeout);
 
 	if (count)
-		tty_flip_buffer_push(&port->state->port);
+		tty_schedule_flip(&port->state->port);
 
 	desc = dmaengine_prep_slave_sg(s->chan_rx, &s->sg_rx[active], 1,
 				       DMA_DEV_TO_MEM,
@@ -1517,7 +1517,7 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struct hrtimer *t)
 	if (read) {
 		count = sci_dma_rx_push(s, s->rx_buf[active], read);
 		if (count)
-			tty_flip_buffer_push(&port->state->port);
+			tty_schedule_flip(&port->state->port);
 	}
 
 	if (port->type == PORT_SCIFA || port->type == PORT_SCIFB)
diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
index 0ac0371f943b..b65234aaccef 100644
--- a/drivers/tty/serial/sifive.c
+++ b/drivers/tty/serial/sifive.c
@@ -448,7 +448,7 @@ static void __ssp_receive_chars(struct sifive_serial_port *ssp)
 		uart_insert_char(&ssp->port, 0, 0, ch, TTY_NORMAL);
 	}
 
-	tty_flip_buffer_push(&ssp->port.state->port);
+	tty_schedule_flip(&ssp->port.state->port);
 }
 
 /**
diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
index 9a7ae6384edf..706351a48557 100644
--- a/drivers/tty/serial/sprd_serial.c
+++ b/drivers/tty/serial/sprd_serial.c
@@ -392,7 +392,7 @@ static void sprd_uart_dma_rx(struct uart_port *port)
 
 	port->icount.rx += sp->rx_dma.trans_len;
 	tty_insert_flip_string(tty, sp->rx_buf_tail, sp->rx_dma.trans_len);
-	tty_flip_buffer_push(tty);
+	tty_schedule_flip(tty);
 }
 
 static void sprd_uart_dma_irq(struct uart_port *port)
@@ -621,7 +621,7 @@ static inline void sprd_rx(struct uart_port *port)
 		uart_insert_char(port, lsr, SPRD_LSR_OE, ch, flag);
 	}
 
-	tty_flip_buffer_push(tty);
+	tty_schedule_flip(tty);
 }
 
 static inline void sprd_tx(struct uart_port *port)
diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c
index 87e480cc8206..45d5086464d9 100644
--- a/drivers/tty/serial/st-asc.c
+++ b/drivers/tty/serial/st-asc.c
@@ -350,7 +350,7 @@ static void asc_receive_chars(struct uart_port *port)
 	}
 
 	/* Tell the rest of the system the news. New characters! */
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 }
 
 static irqreturn_t asc_interrupt(int irq, void *ptr)
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 8f032e77b954..5cb33293f12d 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -277,7 +277,7 @@ static void stm32_usart_receive_chars(struct uart_port *port, bool threaded)
 
 	uart_unlock_and_check_sysrq(port);
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 }
 
 static void stm32_usart_tx_dma_complete(void *arg)
diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c
index eafada8fb6fa..616aa86b923a 100644
--- a/drivers/tty/serial/sunhv.c
+++ b/drivers/tty/serial/sunhv.c
@@ -225,7 +225,7 @@ static irqreturn_t sunhv_interrupt(int irq, void *dev_id)
 	spin_unlock_irqrestore(&port->lock, flags);
 
 	if (tport)
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c
index 92e572634009..9a6cb4523ab9 100644
--- a/drivers/tty/serial/sunsab.c
+++ b/drivers/tty/serial/sunsab.c
@@ -334,7 +334,7 @@ static irqreturn_t sunsab_interrupt(int irq, void *dev_id)
 	spin_unlock_irqrestore(&up->port.lock, flags);
 
 	if (port)
-		tty_flip_buffer_push(port);
+		tty_schedule_flip(port);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c
index 425a016f9db7..9426ea939eb3 100644
--- a/drivers/tty/serial/sunsu.c
+++ b/drivers/tty/serial/sunsu.c
@@ -466,7 +466,7 @@ static irqreturn_t sunsu_serial_interrupt(int irq, void *dev_id)
 		if (status & UART_LSR_THRE)
 			transmit_chars(up);
 
-		tty_flip_buffer_push(&up->port.state->port);
+		tty_schedule_flip(&up->port.state->port);
 
 	} while (!(serial_in(up, UART_IIR) & UART_IIR_NO_INT));
 
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c
index 1a54e3e52ed6..de4c26f3523d 100644
--- a/drivers/tty/serial/sunzilog.c
+++ b/drivers/tty/serial/sunzilog.c
@@ -552,7 +552,7 @@ static irqreturn_t sunzilog_interrupt(int irq, void *dev_id)
 		spin_unlock(&up->port.lock);
 
 		if (port)
-			tty_flip_buffer_push(port);
+			tty_schedule_flip(port);
 
 		/* Channel B */
 		up = up->next;
@@ -575,7 +575,7 @@ static irqreturn_t sunzilog_interrupt(int irq, void *dev_id)
 		spin_unlock(&up->port.lock);
 
 		if (port)
-			tty_flip_buffer_push(port);
+			tty_schedule_flip(port);
 
 		up = up->next;
 	}
diff --git a/drivers/tty/serial/tegra-tcu.c b/drivers/tty/serial/tegra-tcu.c
index 4877c54c613d..3232f702d3d1 100644
--- a/drivers/tty/serial/tegra-tcu.c
+++ b/drivers/tty/serial/tegra-tcu.c
@@ -171,7 +171,7 @@ static void tegra_tcu_receive(struct mbox_client *cl, void *msg)
 		tty_insert_flip_char(port, TCU_MBOX_BYTE_V(value, i),
 				     TTY_NORMAL);
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 }
 
 static int tegra_tcu_probe(struct platform_device *pdev)
diff --git a/drivers/tty/serial/timbuart.c b/drivers/tty/serial/timbuart.c
index 08941eabe7b1..c82365cf85b7 100644
--- a/drivers/tty/serial/timbuart.c
+++ b/drivers/tty/serial/timbuart.c
@@ -87,7 +87,7 @@ static void timbuart_rx_chars(struct uart_port *port)
 		tty_insert_flip_char(tport, ch, TTY_NORMAL);
 	}
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 
 	dev_dbg(port->dev, "%s - total read %d bytes\n",
 		__func__, port->icount.rx);
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index dfc1ba4e1572..28d3670faa01 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -218,7 +218,7 @@ static irqreturn_t ulite_isr(int irq, void *dev_id)
 
 	/* work done? */
 	if (n > 1) {
-		tty_flip_buffer_push(&port->state->port);
+		tty_schedule_flip(&port->state->port);
 		return IRQ_HANDLED;
 	} else {
 		return IRQ_NONE;
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 6000853973c1..d5fc1e29d4d1 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -523,7 +523,7 @@ static void qe_uart_int_rx(struct uart_qe_port *qe_port)
 	qe_port->rx_cur = bdp;
 
 	/* Activate BH processing */
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 
 	return;
 
diff --git a/drivers/tty/serial/vr41xx_siu.c b/drivers/tty/serial/vr41xx_siu.c
index 647198b1e2b9..6c36c7d44812 100644
--- a/drivers/tty/serial/vr41xx_siu.c
+++ b/drivers/tty/serial/vr41xx_siu.c
@@ -346,7 +346,7 @@ static inline void receive_chars(struct uart_port *port, uint8_t *status)
 		lsr = siu_read(port, UART_LSR);
 	} while ((lsr & UART_LSR_DR) && (max_count-- > 0));
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 
 	*status = lsr;
 }
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index e15b2bf69904..172b0c2ebc9d 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -184,7 +184,7 @@ static void handle_rx(struct uart_port *port)
 			tty_insert_flip_char(tport, c, flag);
 	}
 
-	tty_flip_buffer_push(tport);
+	tty_schedule_flip(tport);
 }
 
 static void handle_tx(struct uart_port *port)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 962e522ccc45..156c1e449f9b 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -302,7 +302,7 @@ static void cdns_uart_handle_rx(void *dev_id, unsigned int isrstatus)
 		isrstatus = 0;
 	}
 
-	tty_flip_buffer_push(&port->state->port);
+	tty_schedule_flip(&port->state->port);
 }
 
 /**
diff --git a/drivers/tty/serial/zs.c b/drivers/tty/serial/zs.c
index 4b4f604646a7..001958ab6041 100644
--- a/drivers/tty/serial/zs.c
+++ b/drivers/tty/serial/zs.c
@@ -600,7 +600,7 @@ static void zs_receive_chars(struct zs_port *zport)
 		uart_insert_char(uport, status, Rx_OVR, ch, flag);
 	}
 
-	tty_flip_buffer_push(&uport->state->port);
+	tty_schedule_flip(&uport->state->port);
 }
 
 static void zs_raw_transmit_chars(struct zs_port *zport)
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 09/16] tty: drivers/tty/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
@ 2021-09-14  9:14   ` Jiri Slaby
  2021-09-14 16:06     ` David Sterba
  2021-09-14  9:14   ` [PATCH 10/16] tty: drivers/usb/serial/, " Jiri Slaby
                     ` (17 subsequent siblings)
  18 siblings, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:14 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, Laurentiu Tudor,
	Jiri Kosina, David Sterba, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	David S. Miller

Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the former, so call the latter directly in the rest of
drivers/tty/.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Cc: Jiri Kosina <jikos@kernel.org>
Cc: David Sterba <dsterba@suse.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: "David S. Miller" <davem@davemloft.net>
---
 drivers/tty/amiserial.c           | 2 +-
 drivers/tty/ehv_bytechan.c        | 2 +-
 drivers/tty/hvc/hvc_console.c     | 2 +-
 drivers/tty/hvc/hvcs.c            | 2 +-
 drivers/tty/hvc/hvsi.c            | 6 +++---
 drivers/tty/ipwireless/hardware.c | 2 +-
 drivers/tty/ipwireless/tty.c      | 2 +-
 drivers/tty/mips_ejtag_fdc.c      | 2 +-
 drivers/tty/mxser.c               | 2 +-
 drivers/tty/n_gsm.c               | 4 ++--
 drivers/tty/nozomi.c              | 2 +-
 drivers/tty/pty.c                 | 2 +-
 drivers/tty/synclink_gt.c         | 2 +-
 drivers/tty/vcc.c                 | 2 +-
 14 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 1e60dbef676c..47daa64e2a65 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -256,7 +256,7 @@ static void receive_chars(struct serial_state *info)
 	tty_insert_flip_char(&info->tport, ch, flag);
 	if (oe == 1)
 		tty_insert_flip_char(&info->tport, 0, TTY_OVERRUN);
-	tty_flip_buffer_push(&info->tport);
+	tty_schedule_flip(&info->tport);
 out:
 	return;
 }
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index 19d32cb6af84..971f7c557e29 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -393,7 +393,7 @@ static irqreturn_t ehv_bc_tty_rx_isr(int irq, void *data)
 	}
 
 	/* Tell the tty layer that we're done. */
-	tty_flip_buffer_push(&bc->port);
+	tty_schedule_flip(&bc->port);
 
 	return IRQ_HANDLED;
 }
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 7b30d5a05e2f..dc8db977bec7 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -752,7 +752,7 @@ static int __hvc_poll(struct hvc_struct *hp, bool may_sleep)
 		   a minimum for performance. */
 		timeout = MIN_TIMEOUT;
 
-		tty_flip_buffer_push(&hp->port);
+		tty_schedule_flip(&hp->port);
 	}
 	tty_kref_put(tty);
 
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 245da1dfd818..51e8478d55c0 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -582,7 +582,7 @@ static int hvcs_io(struct hvcs_struct *hvcsd)
 	spin_unlock_irqrestore(&hvcsd->lock, flags);
 	/* This is synch -- FIXME :js: it is not! */
 	if(got)
-		tty_flip_buffer_push(&hvcsd->port);
+		tty_schedule_flip(&hvcsd->port);
 
 	if (!got) {
 		/* Do this _after_ the flip_buffer_push */
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c
index aa81f4835fef..8e4ad5cb2387 100644
--- a/drivers/tty/hvc/hvsi.c
+++ b/drivers/tty/hvc/hvsi.c
@@ -454,7 +454,7 @@ static int hvsi_load_chunk(struct hvsi_struct *hp, struct tty_struct *tty,
 	compact_inbuf(hp, packet);
 
 	if (flip)
-		tty_flip_buffer_push(&hp->port);
+		tty_schedule_flip(&hp->port);
 
 	return 1;
 }
@@ -500,7 +500,7 @@ static irqreturn_t hvsi_interrupt(int irq, void *arg)
 		/* we weren't hung up and we weren't throttled, so we can
 		 * deliver the rest now */
 		hvsi_send_overflow(hp);
-		tty_flip_buffer_push(&hp->port);
+		tty_schedule_flip(&hp->port);
 	}
 	spin_unlock_irqrestore(&hp->lock, flags);
 
@@ -982,7 +982,7 @@ static void hvsi_unthrottle(struct tty_struct *tty)
 	spin_lock_irqsave(&hp->lock, flags);
 	if (hp->n_throttle) {
 		hvsi_send_overflow(hp);
-		tty_flip_buffer_push(&hp->port);
+		tty_schedule_flip(&hp->port);
 	}
 	spin_unlock_irqrestore(&hp->lock, flags);
 
diff --git a/drivers/tty/ipwireless/hardware.c b/drivers/tty/ipwireless/hardware.c
index f5d3e68f5750..605a99f18ee1 100644
--- a/drivers/tty/ipwireless/hardware.c
+++ b/drivers/tty/ipwireless/hardware.c
@@ -719,7 +719,7 @@ static void ipw_receive_data_work(struct work_struct *work_rx)
 		/*
 		 * Note: ipwireless_network_packet_received must be called in a
 		 * process context (i.e. via schedule_work) because the tty
-		 * output code can sleep in the tty_flip_buffer_push call.
+		 * output code can sleep in the tty_schedule_flip call.
 		 */
 		if (packet->protocol == TL_PROTOCOLID_COM_DATA) {
 			if (hw->network != NULL) {
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c
index 9edd5ae17580..694e62383479 100644
--- a/drivers/tty/ipwireless/tty.c
+++ b/drivers/tty/ipwireless/tty.c
@@ -171,7 +171,7 @@ void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
 				length - work);
 
 	if (work)
-		tty_flip_buffer_push(&tty->port);
+		tty_schedule_flip(&tty->port);
 }
 
 static void ipw_write_packet_sent_callback(void *callback_data,
diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index 02c10a968de1..b8675782cf28 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -613,7 +613,7 @@ static void mips_ejtag_fdc_handle(struct mips_ejtag_fdc_tty *priv)
 							TTY_NORMAL);
 		}
 		if (flipped)
-			tty_flip_buffer_push(&dport->port);
+			tty_schedule_flip(&dport->port);
 
 		raw_spin_unlock(&dport->rx_lock);
 	}
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 1216f3985e18..e084e4803f9f 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -1637,7 +1637,7 @@ static u8 mxser_receive_chars(struct tty_struct *tty,
 	if (!mxser_receive_chars_new(tty, port, status))
 		status = mxser_receive_chars_old(tty, port, status);
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 
 	return status;
 }
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 59bbd4f6a610..b734362cdbea 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -1171,7 +1171,7 @@ static void gsm_control_rls(struct gsm_mux *gsm, const u8 *data, int clen)
 	if (bits & 8)
 		tty_insert_flip_char(port, 0, TTY_FRAME);
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 
 	gsm_control_reply(gsm, CMD_RLS, data, clen);
 }
@@ -1589,7 +1589,7 @@ static void gsm_dlci_data(struct gsm_dlci *dlci, const u8 *data, int clen)
 	case 1:		/* Line state will go via DLCI 0 controls only */
 	default:
 		tty_insert_flip_string(port, data, len);
-		tty_flip_buffer_push(port);
+		tty_schedule_flip(port);
 	}
 }
 
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index 0454c78deee6..a70512470799 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -1222,7 +1222,7 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id)
 
 	for (a = 0; a < NOZOMI_MAX_PORTS; a++)
 		if (test_and_clear_bit(a, &dc->flip))
-			tty_flip_buffer_push(&dc->port[a].port);
+			tty_schedule_flip(&dc->port[a].port);
 
 	return IRQ_HANDLED;
 none:
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 74bfabe5b453..95cb84319b7d 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -123,7 +123,7 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
 		spin_unlock_irqrestore(&to->port->lock, flags);
 		/* And shovel */
 		if (c)
-			tty_flip_buffer_push(to->port);
+			tty_schedule_flip(to->port);
 	}
 	return c;
 }
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index a9acd93e85b7..beea9c6141a5 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -1820,7 +1820,7 @@ static void rx_async(struct slgt_info *info)
 	}
 
 	if (chars)
-		tty_flip_buffer_push(&info->port);
+		tty_schedule_flip(&info->port);
 }
 
 /*
diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c
index e11383ae1e7e..0fa8539a0f6b 100644
--- a/drivers/tty/vcc.c
+++ b/drivers/tty/vcc.c
@@ -297,7 +297,7 @@ static int vcc_rx(struct tty_struct *tty, char *buf, int size)
 
 	len = tty_insert_flip_string(tty->port, buf, size);
 	if (len)
-		tty_flip_buffer_push(tty->port);
+		tty_schedule_flip(tty->port);
 
 	return len;
 }
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 10/16] tty: drivers/usb/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
  2021-09-14  9:14   ` [PATCH 09/16] tty: drivers/tty/, " Jiri Slaby
@ 2021-09-14  9:14   ` Jiri Slaby
  2021-09-14  9:14   ` [PATCH 11/16] tty: drivers/usb/, " Jiri Slaby
                     ` (16 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:14 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby, Johan Hovold, linux-usb

Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the former, so call the latter directly in
drivers/usb/serial/.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Johan Hovold <johan@kernel.org>
Cc: linux-usb@vger.kernel.org
---
 drivers/usb/serial/aircable.c         |  2 +-
 drivers/usb/serial/ark3116.c          |  2 +-
 drivers/usb/serial/belkin_sa.c        |  2 +-
 drivers/usb/serial/cp210x.c           |  2 +-
 drivers/usb/serial/cyberjack.c        |  2 +-
 drivers/usb/serial/cypress_m8.c       |  2 +-
 drivers/usb/serial/digi_acceleport.c  |  2 +-
 drivers/usb/serial/f81232.c           |  4 ++--
 drivers/usb/serial/f81534.c           |  2 +-
 drivers/usb/serial/ftdi_sio.c         |  2 +-
 drivers/usb/serial/garmin_gps.c       |  2 +-
 drivers/usb/serial/generic.c          |  2 +-
 drivers/usb/serial/io_edgeport.c      |  2 +-
 drivers/usb/serial/io_ti.c            |  2 +-
 drivers/usb/serial/ir-usb.c           |  2 +-
 drivers/usb/serial/iuu_phoenix.c      |  2 +-
 drivers/usb/serial/keyspan.c          | 10 +++++-----
 drivers/usb/serial/keyspan_pda.c      |  2 +-
 drivers/usb/serial/kl5kusb105.c       |  2 +-
 drivers/usb/serial/kobil_sct.c        |  2 +-
 drivers/usb/serial/mct_u232.c         |  2 +-
 drivers/usb/serial/metro-usb.c        |  2 +-
 drivers/usb/serial/mos7720.c          |  2 +-
 drivers/usb/serial/mos7840.c          |  2 +-
 drivers/usb/serial/mxuport.c          |  2 +-
 drivers/usb/serial/navman.c           |  2 +-
 drivers/usb/serial/omninet.c          |  2 +-
 drivers/usb/serial/opticon.c          |  2 +-
 drivers/usb/serial/oti6858.c          |  2 +-
 drivers/usb/serial/pl2303.c           |  2 +-
 drivers/usb/serial/quatech2.c         |  4 ++--
 drivers/usb/serial/safe_serial.c      |  2 +-
 drivers/usb/serial/sierra.c           |  2 +-
 drivers/usb/serial/ssu100.c           |  2 +-
 drivers/usb/serial/symbolserial.c     |  2 +-
 drivers/usb/serial/ti_usb_3410_5052.c |  2 +-
 drivers/usb/serial/usb_wwan.c         |  2 +-
 37 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index a1df686c3066..762f1183c965 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -133,7 +133,7 @@ static void aircable_process_read_urb(struct urb *urb)
 	}
 
 	if (count)
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 }
 
 static struct usb_serial_driver aircable_device = {
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index 5dd710e9fe7d..bf891eeb4d06 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -605,7 +605,7 @@ static void ark3116_process_read_urb(struct urb *urb)
 	}
 	tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
 							urb->actual_length);
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static struct usb_serial_driver ark3116_device = {
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index 8107e4b5b03b..fa715d8f5232 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -269,7 +269,7 @@ static void belkin_sa_process_read_urb(struct urb *urb)
 
 	tty_insert_flip_string_fixed_flag(&port->port, data, tty_flag,
 							urb->actual_length);
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void belkin_sa_set_termios(struct tty_struct *tty,
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 66a6ac50a4cd..c934f5173fbf 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -939,7 +939,7 @@ static void cp210x_process_read_urb(struct urb *urb)
 	} else {
 		tty_insert_flip_string(&port->port, ch, urb->actual_length);
 	}
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 /*
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 51e5aac3bf4c..9a5a3c0427c5 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -322,7 +322,7 @@ static void cyberjack_read_bulk_callback(struct urb *urb)
 
 	if (urb->actual_length) {
 		tty_insert_flip_string(&port->port, data, urb->actual_length);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	spin_lock_irqsave(&priv->lock, flags);
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 6924fa95f6bd..db6f150c12c0 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -1128,7 +1128,7 @@ static void cypress_read_int_callback(struct urb *urb)
 	if (bytes > i) {
 		tty_insert_flip_string_fixed_flag(&port->port, data + i,
 				tty_flag, bytes - i);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	spin_lock_irqsave(&priv->lock, flags);
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index af65eb863d70..a47f9a412b8a 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -1416,7 +1416,7 @@ static int digi_read_inb_callback(struct urb *urb)
 		if (len > 0) {
 			tty_insert_flip_string_fixed_flag(&port->port, data,
 					tty_flag, len);
-			tty_flip_buffer_push(&port->port);
+			tty_schedule_flip(&port->port);
 		}
 	}
 	spin_unlock_irqrestore(&priv->dp_port_lock, flags);
diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c
index a7a7af8d05bf..1e13f9abc66a 100644
--- a/drivers/usb/serial/f81232.c
+++ b/drivers/usb/serial/f81232.c
@@ -428,7 +428,7 @@ static void f81232_process_read_urb(struct urb *urb)
 		tty_insert_flip_char(&port->port, data[i + 1], tty_flag);
 	}
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void f81534a_process_read_urb(struct urb *urb)
@@ -469,7 +469,7 @@ static void f81534a_process_read_urb(struct urb *urb)
 							tty_flag, len - 2);
 	}
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void f81232_break_ctl(struct tty_struct *tty, int break_state)
diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c
index c0bca52ef92a..78da1c5805d1 100644
--- a/drivers/usb/serial/f81534.c
+++ b/drivers/usb/serial/f81534.c
@@ -1239,7 +1239,7 @@ static void f81534_process_per_serial_block(struct usb_serial_port *port,
 		tty_insert_flip_char(&port->port, data[i], tty_flag);
 	}
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void f81534_process_read_urb(struct urb *urb)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 99d19828dae6..c47121d704b9 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -2603,7 +2603,7 @@ static void ftdi_process_read_urb(struct urb *urb)
 	}
 
 	if (count)
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 }
 
 static void ftdi_break_ctl(struct tty_struct *tty, int break_state)
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index e5c75944ebb7..79a6f0f646a5 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -245,7 +245,7 @@ static void send_to_tty(struct usb_serial_port *port,
 	if (actual_length) {
 		usb_serial_debug_data(&port->dev, __func__, actual_length, data);
 		tty_insert_flip_string(&port->port, data, actual_length);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 }
 
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 15b6dee3a8e5..0ff57b3479b0 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -363,7 +363,7 @@ void usb_serial_generic_process_read_urb(struct urb *urb)
 	} else {
 		tty_insert_flip_string(&port->port, ch, urb->actual_length);
 	}
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 EXPORT_SYMBOL_GPL(usb_serial_generic_process_read_urb);
 
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index bdee78cc4a07..ee13f8159132 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -1876,7 +1876,7 @@ static void edge_tty_recv(struct usb_serial_port *port, unsigned char *data,
 	data += cnt;
 	length -= cnt;
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index a7b3c15957ba..b2ea8b0136bd 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -1794,7 +1794,7 @@ static void edge_tty_recv(struct usb_serial_port *port, unsigned char *data,
 	if (queued < length)
 		dev_err(&port->dev, "%s - dropping data, %d bytes lost\n",
 			__func__, length - queued);
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void edge_bulk_out_callback(struct urb *urb)
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 7b44dbea95cd..120d9104c027 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -372,7 +372,7 @@ static void ir_process_read_urb(struct urb *urb)
 		return;
 
 	tty_insert_flip_string(&port->port, data + 1, urb->actual_length - 1);
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void ir_set_termios(struct tty_struct *tty,
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 0be3b5e1eaf3..c18da8faadf5 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -590,7 +590,7 @@ static void read_buf_callback(struct urb *urb)
 
 	if (urb->actual_length) {
 		tty_insert_flip_string(&port->port, data, urb->actual_length);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 	iuu_led_activity_on(urb);
 }
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 87b89c99d517..0524b64326fa 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -810,7 +810,7 @@ static void	usa26_indat_callback(struct urb *urb)
 						flag);
 			}
 		}
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	/* Resubmit urb so we continue receiving */
@@ -936,7 +936,7 @@ static void usa28_indat_callback(struct urb *urb)
 		if (urb->actual_length) {
 			tty_insert_flip_string(&port->port, data,
 					urb->actual_length);
-			tty_flip_buffer_push(&port->port);
+			tty_schedule_flip(&port->port);
 		}
 
 		/* Resubmit urb so we continue receiving */
@@ -1154,7 +1154,7 @@ static void	usa49_indat_callback(struct urb *urb)
 						flag);
 			}
 		}
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	/* Resubmit urb so we continue receiving */
@@ -1225,7 +1225,7 @@ static void usa49wg_indat_callback(struct urb *urb)
 				i += 2;
 			}
 		}
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	/* Resubmit urb so we continue receiving */
@@ -1301,7 +1301,7 @@ static void usa90_indat_callback(struct urb *urb)
 				}
 			}
 		}
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	/* Resubmit urb so we continue receiving */
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 39b0f5f344c2..b0f482854289 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -190,7 +190,7 @@ static void keyspan_pda_rx_interrupt(struct urb *urb)
 		if (len < 2)
 			break;
 		tty_insert_flip_string(&port->port, data + 1, len - 1);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 		break;
 	case 1:
 		/* status interrupt */
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index f1e9628a9907..8931f427e557 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -388,7 +388,7 @@ static void klsi_105_process_read_urb(struct urb *urb)
 	}
 
 	tty_insert_flip_string(&port->port, data + KLSI_HDR_LEN, len);
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void klsi_105_set_termios(struct tty_struct *tty,
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 4ed8b8b0a361..44f73db45e19 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -276,7 +276,7 @@ static void kobil_read_int_callback(struct urb *urb)
 		usb_serial_debug_data(&port->dev, __func__, urb->actual_length,
 									data);
 		tty_insert_flip_string(&port->port, data, urb->actual_length);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC);
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index ecd5b921e374..bb7eedd63a76 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -538,7 +538,7 @@ static void mct_u232_read_int_callback(struct urb *urb)
 		if (urb->actual_length) {
 			tty_insert_flip_string(&port->port, data,
 					urb->actual_length);
-			tty_flip_buffer_push(&port->port);
+			tty_schedule_flip(&port->port);
 		}
 		goto exit;
 	}
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
index 30ab565e0738..6f7927dc3198 100644
--- a/drivers/usb/serial/metro-usb.c
+++ b/drivers/usb/serial/metro-usb.c
@@ -141,7 +141,7 @@ static void metrousb_read_int_callback(struct urb *urb)
 		tty_insert_flip_string(&port->port, data, urb->actual_length);
 
 		/* Force the data to the tty layer. */
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	/* Set any port variables. */
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 227f43d2bd56..f00088343b04 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -782,7 +782,7 @@ static void mos7720_bulk_in_callback(struct urb *urb)
 
 	if (urb->actual_length) {
 		tty_insert_flip_string(&port->port, data, urb->actual_length);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	if (port->read_urb->status != -EINPROGRESS) {
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index d7fe33ca73e4..16e5cfa322ca 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -451,7 +451,7 @@ static void mos7840_bulk_in_callback(struct urb *urb)
 	if (urb->actual_length) {
 		struct tty_port *tport = &mos7840_port->port->port;
 		tty_insert_flip_string(tport, data, urb->actual_length);
-		tty_flip_buffer_push(tport);
+		tty_schedule_flip(tport);
 		port->icount.rx += urb->actual_length;
 		dev_dbg(&port->dev, "icount.rx is %d:\n", port->icount.rx);
 	}
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
index eb45a9b0005c..32885e31e27d 100644
--- a/drivers/usb/serial/mxuport.c
+++ b/drivers/usb/serial/mxuport.c
@@ -329,7 +329,7 @@ static void mxuport_process_read_urb_data(struct usb_serial_port *port,
 	} else {
 		tty_insert_flip_string(&port->port, data, size);
 	}
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void mxuport_msr_event(struct usb_serial_port *port, u8 buf[4])
diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c
index 20277c52dded..296cb07f438c 100644
--- a/drivers/usb/serial/navman.c
+++ b/drivers/usb/serial/navman.c
@@ -52,7 +52,7 @@ static void navman_read_int_callback(struct urb *urb)
 
 	if (urb->actual_length) {
 		tty_insert_flip_string(&port->port, data, urb->actual_length);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 exit:
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 41f1b872d277..f984b3cc2ca0 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -149,7 +149,7 @@ static void omninet_process_read_urb(struct urb *urb)
 	data_len = min_t(size_t, urb->actual_length - OMNINET_HEADERLEN,
 								hdr->oh_len);
 	tty_insert_flip_string(&port->port, data, data_len);
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static int omninet_prepare_write_buffer(struct usb_serial_port *port,
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index aed28c35caff..844f0bc04336 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -51,7 +51,7 @@ static void opticon_process_data_packet(struct usb_serial_port *port,
 					const unsigned char *buf, size_t len)
 {
 	tty_insert_flip_string(&port->port, buf, len);
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void opticon_process_status_packet(struct usb_serial_port *port,
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index a5caedbe72e2..0abfd07d80e7 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -780,7 +780,7 @@ static void oti6858_read_bulk_callback(struct urb *urb)
 
 	if (urb->actual_length > 0) {
 		tty_insert_flip_string(&port->port, data, urb->actual_length);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	}
 
 	/* schedule the interrupt urb */
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 930b3d50a330..84a63885cda5 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -1211,7 +1211,7 @@ static void pl2303_process_read_urb(struct urb *urb)
 							urb->actual_length);
 	}
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static struct usb_serial_driver pl2303_device = {
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c
index 971907f083a3..e1a44cfd88b1 100644
--- a/drivers/usb/serial/quatech2.c
+++ b/drivers/usb/serial/quatech2.c
@@ -521,7 +521,7 @@ static void qt2_process_read_urb(struct urb *urb)
 						 __func__);
 					break;
 				}
-				tty_flip_buffer_push(&port->port);
+				tty_schedule_flip(&port->port);
 
 				newport = *(ch + 3);
 
@@ -560,7 +560,7 @@ static void qt2_process_read_urb(struct urb *urb)
 		tty_insert_flip_char(&port->port, *ch, TTY_NORMAL);
 	}
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void qt2_write_bulk_callback(struct urb *urb)
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index 6accbecb6318..be239d61abc2 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -217,7 +217,7 @@ static void safe_process_read_urb(struct urb *urb)
 	length = actual_length;
 out:
 	tty_insert_flip_string(&port->port, data, length);
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static int safe_prepare_write_buffer(struct usb_serial_port *port,
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 9d56138133a9..ba61c0832151 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -538,7 +538,7 @@ static void sierra_indat_callback(struct urb *urb)
 		if (urb->actual_length) {
 			tty_insert_flip_string(&port->port, data,
 				urb->actual_length);
-			tty_flip_buffer_push(&port->port);
+			tty_schedule_flip(&port->port);
 
 			usb_serial_debug_data(&port->dev, __func__,
 					      urb->actual_length, data);
diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c
index 3baf7c0f5a98..3ded890d6347 100644
--- a/drivers/usb/serial/ssu100.c
+++ b/drivers/usb/serial/ssu100.c
@@ -509,7 +509,7 @@ static void ssu100_process_read_urb(struct urb *urb)
 		tty_insert_flip_string_fixed_flag(&port->port, ch, flag, len);
 	}
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static struct usb_serial_driver ssu100_device = {
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c
index d7f73ad6e778..ed375af3a294 100644
--- a/drivers/usb/serial/symbolserial.c
+++ b/drivers/usb/serial/symbolserial.c
@@ -68,7 +68,7 @@ static void symbol_int_callback(struct urb *urb)
 		if (data_length > (urb->actual_length - 1))
 			data_length = urb->actual_length - 1;
 		tty_insert_flip_string(&port->port, &data[1], data_length);
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	} else {
 		dev_dbg(&port->dev, "%s - short packet\n", __func__);
 	}
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 18c0bd853392..fcb3fa636660 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -1275,7 +1275,7 @@ static void ti_recv(struct usb_serial_port *port, unsigned char *data,
 			if (cnt == 0)
 				break;
 		}
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 		data += cnt;
 		length -= cnt;
 	} while (length > 0);
diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
index cb01283d4d15..c793548c0edf 100644
--- a/drivers/usb/serial/usb_wwan.c
+++ b/drivers/usb/serial/usb_wwan.c
@@ -233,7 +233,7 @@ static void usb_wwan_indat_callback(struct urb *urb)
 		if (urb->actual_length) {
 			tty_insert_flip_string(&port->port, data,
 					urb->actual_length);
-			tty_flip_buffer_push(&port->port);
+			tty_schedule_flip(&port->port);
 		} else
 			dev_dbg(dev, "%s: empty read urb received\n", __func__);
 	}
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 11/16] tty: drivers/usb/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
  2021-09-14  9:14   ` [PATCH 09/16] tty: drivers/tty/, " Jiri Slaby
  2021-09-14  9:14   ` [PATCH 10/16] tty: drivers/usb/serial/, " Jiri Slaby
@ 2021-09-14  9:14   ` Jiri Slaby
  2021-09-14  9:14   ` [PATCH 12/16] tty: arch/, " Jiri Slaby
                     ` (15 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:14 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, Oliver Neukum,
	Felipe Balbi, Mathias Nyman, linux-usb

Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the former, so call the latter directly in the rest of
drivers/usb/.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Oliver Neukum <oneukum@suse.com>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: linux-usb@vger.kernel.org
---
 drivers/usb/class/cdc-acm.c            | 2 +-
 drivers/usb/gadget/function/u_serial.c | 2 +-
 drivers/usb/host/xhci-dbgtty.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 8bbd8e29e60d..eeea1ed7fd71 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -480,7 +480,7 @@ static void acm_process_read_urb(struct acm *acm, struct urb *urb)
 
 	tty_insert_flip_string(&acm->port, urb->transfer_buffer,
 			urb->actual_length);
-	tty_flip_buffer_push(&acm->port);
+	tty_schedule_flip(&acm->port);
 }
 
 static void acm_read_bulk_callback(struct urb *urb)
diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
index 6f68cbeeee7c..39fa27b63cbd 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -426,7 +426,7 @@ static void gs_rx_push(struct work_struct *work)
 	 * so we won't get callbacks and can hold port_lock
 	 */
 	if (do_push)
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 
 
 	/* We want our data queue to become empty ASAP, keeping data
diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c
index 6e784f2fc26d..48b7e7f52d75 100644
--- a/drivers/usb/host/xhci-dbgtty.c
+++ b/drivers/usb/host/xhci-dbgtty.c
@@ -344,7 +344,7 @@ static void dbc_rx_push(struct tasklet_struct *t)
 	}
 
 	if (do_push)
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 
 	if (!list_empty(queue) && tty) {
 		if (!tty_throttled(tty)) {
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 12/16] tty: arch/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (2 preceding siblings ...)
  2021-09-14  9:14   ` [PATCH 11/16] tty: drivers/usb/, " Jiri Slaby
@ 2021-09-14  9:14   ` Jiri Slaby
  2021-09-15  8:10       ` Max Filippov
  2021-09-14  9:14   ` [PATCH 13/16] tty: drivers/s390/char/, " Jiri Slaby
                     ` (14 subsequent siblings)
  18 siblings, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:14 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, James E.J. Bottomley,
	Helge Deller, Jeff Dike, Richard Weinberger, Anton Ivanov,
	Chris Zankel, Max Filippov, linux-parisc, linux-um, linux-xtensa

Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the former, so call the latter directly in arch/.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-parisc@vger.kernel.org
Cc: linux-um@lists.infradead.org
Cc: linux-xtensa@linux-xtensa.org
---
 arch/parisc/kernel/pdc_cons.c       | 2 +-
 arch/um/drivers/chan_kern.c         | 2 +-
 arch/xtensa/platforms/iss/console.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index 2661cdd256ae..221af0ab3382 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -128,7 +128,7 @@ static void pdc_console_poll(struct timer_list *unused)
 	}
 
 	if (count)
-		tty_flip_buffer_push(&tty_port);
+		tty_schedule_flip(&tty_port);
 
 	if (pdc_cons.flags & CON_ENABLED)
 		mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 62997055c454..62164db99f99 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -566,5 +566,5 @@ void chan_interrupt(struct line *line, int irq)
 			return;
 	}
  out:
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 }
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index 81d7c7e8f7e9..8d8580d1ef56 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -84,7 +84,7 @@ static void rs_poll(struct timer_list *unused)
 	}
 
 	if (i)
-		tty_flip_buffer_push(port);
+		tty_schedule_flip(port);
 	if (rd)
 		mod_timer(&serial_timer, jiffies + SERIAL_TIMER_VALUE);
 	spin_unlock(&timer_lock);
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 13/16] tty: drivers/s390/char/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (3 preceding siblings ...)
  2021-09-14  9:14   ` [PATCH 12/16] tty: arch/, " Jiri Slaby
@ 2021-09-14  9:14   ` Jiri Slaby
  2021-09-14  9:14   ` [PATCH 14/16] tty: drivers/staging/, " Jiri Slaby
                     ` (13 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:14 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, Heiko Carstens,
	Vasily Gorbik, Christian Borntraeger, linux-s390

Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the former, so call the latter directly in
drivers/s390/char/.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: linux-s390@vger.kernel.org
---
 drivers/s390/char/con3215.c    | 4 ++--
 drivers/s390/char/sclp_tty.c   | 4 ++--
 drivers/s390/char/sclp_vt220.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index f356607835d8..f37f4c0594d7 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -399,7 +399,7 @@ static void raw3215_irq(struct ccw_device *cdev, unsigned long intparm,
 			case CTRLCHAR_CTRL:
 				tty_insert_flip_char(&raw->port, cchar,
 						TTY_NORMAL);
-				tty_flip_buffer_push(&raw->port);
+				tty_schedule_flip(&raw->port);
 				break;
 
 			case CTRLCHAR_NONE:
@@ -413,7 +413,7 @@ static void raw3215_irq(struct ccw_device *cdev, unsigned long intparm,
 					count -= 2;
 				tty_insert_flip_string(&raw->port, raw->inbuf,
 						count);
-				tty_flip_buffer_push(&raw->port);
+				tty_schedule_flip(&raw->port);
 				break;
 			}
 		} else if (req->type == RAW3215_WRITE) {
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
index 971fbb52740b..99256bea31f7 100644
--- a/drivers/s390/char/sclp_tty.c
+++ b/drivers/s390/char/sclp_tty.c
@@ -330,7 +330,7 @@ sclp_tty_input(unsigned char* buf, unsigned int count)
 		break;
 	case CTRLCHAR_CTRL:
 		tty_insert_flip_char(&sclp_port, cchar, TTY_NORMAL);
-		tty_flip_buffer_push(&sclp_port);
+		tty_schedule_flip(&sclp_port);
 		break;
 	case CTRLCHAR_NONE:
 		/* send (normal) input to line discipline */
@@ -342,7 +342,7 @@ sclp_tty_input(unsigned char* buf, unsigned int count)
 			tty_insert_flip_char(&sclp_port, '\n', TTY_NORMAL);
 		} else
 			tty_insert_flip_string(&sclp_port, buf, count - 2);
-		tty_flip_buffer_push(&sclp_port);
+		tty_schedule_flip(&sclp_port);
 		break;
 	}
 	tty_kref_put(tty);
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index 29a6a0099f83..b1ed3bcf3201 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -542,7 +542,7 @@ sclp_vt220_receiver_fn(struct evbuf_header *evbuf)
 		buffer++;
 		count--;
 		sclp_vt220_handle_input(buffer, count);
-		tty_flip_buffer_push(&sclp_vt220_port);
+		tty_schedule_flip(&sclp_vt220_port);
 		break;
 	}
 }
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 14/16] tty: drivers/staging/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (4 preceding siblings ...)
  2021-09-14  9:14   ` [PATCH 13/16] tty: drivers/s390/char/, " Jiri Slaby
@ 2021-09-14  9:14   ` Jiri Slaby
  2021-09-14 13:19     ` [greybus-dev] " Alex Elder
  2021-09-14  9:14   ` [PATCH 15/16] tty: the rest, " Jiri Slaby
                     ` (12 subsequent siblings)
  18 siblings, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:14 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, David Lin, Johan Hovold,
	Alex Elder, linux-staging, greybus-dev

Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the former, so call the latter directly in
drivers/staging/.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: David Lin <dtwlin@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: linux-staging@lists.linux.dev
Cc: greybus-dev@lists.linaro.org
---
 drivers/staging/fwserial/fwserial.c | 4 ++--
 drivers/staging/gdm724x/gdm_tty.c   | 2 +-
 drivers/staging/greybus/uart.c      | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index e8fa7f53cd5e..b2d3f95edbc3 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -518,7 +518,7 @@ static void fwtty_emit_breaks(struct work_struct *work)
 		if (c < t)
 			break;
 	}
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 
 	if (port->mstatus & (UART_LSR_BI << 24))
 		schedule_delayed_work(&port->emit_breaks, FREQ_BREAKS);
@@ -565,7 +565,7 @@ static int fwtty_rx(struct fwtty_port *port, unsigned char *data, size_t len)
 
 	c = tty_insert_flip_string_fixed_flag(&port->port, data, TTY_NORMAL, n);
 	if (c > 0)
-		tty_flip_buffer_push(&port->port);
+		tty_schedule_flip(&port->port);
 	n -= c;
 
 	if (n) {
diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 04df6f9f5403..95a3b4e61fec 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -129,7 +129,7 @@ static int gdm_tty_recv_complete(void *data,
 	if (data && len) {
 		if (tty_buffer_request_room(&gdm->port, len) == len) {
 			tty_insert_flip_string(&gdm->port, data, len);
-			tty_flip_buffer_push(&gdm->port);
+			tty_schedule_flip(&gdm->port);
 		} else {
 			return TO_HOST_BUFFER_REQUEST_FAIL;
 		}
diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index e6d860a9678e..2bdc2401b652 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -122,7 +122,7 @@ static int gb_uart_receive_data_handler(struct gb_operation *op)
 			recv_data_size, count);
 	}
 	if (count)
-		tty_flip_buffer_push(port);
+		tty_schedule_flip(port);
 	return 0;
 }
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 15/16] tty: the rest, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (5 preceding siblings ...)
  2021-09-14  9:14   ` [PATCH 14/16] tty: drivers/staging/, " Jiri Slaby
@ 2021-09-14  9:14   ` Jiri Slaby
  2021-09-14 11:58     ` Samuel Iglesias Gonsálvez
  2021-09-14  9:14   ` [PATCH 16/16] tty: drop tty_flip_buffer_push Jiri Slaby
                     ` (11 subsequent siblings)
  18 siblings, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:14 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby, Arnd Bergmann,
	Samuel Iglesias Gonsalvez, Jens Taprogge, Scott Branden,
	Ulf Hansson, David S. Miller, Jakub Kicinski, Marcel Holtmann,
	Johan Hedberg, Luiz Augusto von Dentz

Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
going to remove the former, so call the latter directly in the couple of
remaining users.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Cc: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: Scott Branden <scott.branden@broadcom.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
---
 drivers/char/pcmcia/synclink_cs.c | 2 +-
 drivers/ipack/devices/ipoctal.c   | 2 +-
 drivers/misc/bcm-vk/bcm_vk_tty.c  | 2 +-
 drivers/mmc/core/sdio_uart.c      | 2 +-
 drivers/net/usb/hso.c             | 2 +-
 net/bluetooth/rfcomm/tty.c        | 4 ++--
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 78baba55a8b5..29a7a89ee58d 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -952,7 +952,7 @@ static void rx_ready_async(MGSLPC_INFO *info, int tcd)
 	}
 
 	if (work)
-		tty_flip_buffer_push(port);
+		tty_schedule_flip(port);
 }
 
 
diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c
index c14e65a5d38f..714e2b8c551f 100644
--- a/drivers/ipack/devices/ipoctal.c
+++ b/drivers/ipack/devices/ipoctal.c
@@ -184,7 +184,7 @@ static void ipoctal_irq_rx(struct ipoctal_channel *channel, u8 sr)
 		sr = ioread8(&channel->regs->r.sr);
 	} while (isr & channel->isr_rx_rdy_mask);
 
-	tty_flip_buffer_push(port);
+	tty_schedule_flip(port);
 }
 
 static void ipoctal_irq_tx(struct ipoctal_channel *channel)
diff --git a/drivers/misc/bcm-vk/bcm_vk_tty.c b/drivers/misc/bcm-vk/bcm_vk_tty.c
index 1b6076a89ca6..328109a719be 100644
--- a/drivers/misc/bcm-vk/bcm_vk_tty.c
+++ b/drivers/misc/bcm-vk/bcm_vk_tty.c
@@ -114,7 +114,7 @@ static void bcm_vk_tty_wq_handler(struct work_struct *work)
 		}
 
 		if (count) {
-			tty_flip_buffer_push(&vktty->port);
+			tty_schedule_flip(&vktty->port);
 
 			/* Update read offset from shadow register to card */
 			vkwrite32(vk, vktty->rd, BAR_1,
diff --git a/drivers/mmc/core/sdio_uart.c b/drivers/mmc/core/sdio_uart.c
index 04c0823e0359..55fc67bd0937 100644
--- a/drivers/mmc/core/sdio_uart.c
+++ b/drivers/mmc/core/sdio_uart.c
@@ -418,7 +418,7 @@ static void sdio_uart_receive_chars(struct sdio_uart_port *port,
 		*status = sdio_in(port, UART_LSR);
 	} while ((*status & UART_LSR_DR) && (max_count-- > 0));
 
-	tty_flip_buffer_push(&port->port);
+	tty_schedule_flip(&port->port);
 }
 
 static void sdio_uart_transmit_chars(struct sdio_uart_port *port)
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 7dc1ef3f93c3..55ea64b162e1 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2018,7 +2018,7 @@ static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial)
 	if (count >= urb->actual_length) {
 		tty_insert_flip_string(&serial->port, urb->transfer_buffer,
 				       urb->actual_length);
-		tty_flip_buffer_push(&serial->port);
+		tty_schedule_flip(&serial->port);
 	} else {
 		dev_warn(&serial->parent->usb->dev,
 			 "dropping data, %d bytes lost\n", urb->actual_length);
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index ebd78fdbd6e8..2a09637bdb00 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -618,7 +618,7 @@ static void rfcomm_dev_data_ready(struct rfcomm_dlc *dlc, struct sk_buff *skb)
 	BT_DBG("dlc %p len %d", dlc, skb->len);
 
 	tty_insert_flip_string(&dev->port, skb->data, skb->len);
-	tty_flip_buffer_push(&dev->port);
+	tty_schedule_flip(&dev->port);
 
 	kfree_skb(skb);
 }
@@ -677,7 +677,7 @@ static void rfcomm_tty_copy_pending(struct rfcomm_dev *dev)
 	rfcomm_dlc_unlock(dev->dlc);
 
 	if (inserted > 0)
-		tty_flip_buffer_push(&dev->port);
+		tty_schedule_flip(&dev->port);
 }
 
 /* do the reverse of install, clearing the tty fields and releasing the
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* [PATCH 16/16] tty: drop tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (6 preceding siblings ...)
  2021-09-14  9:14   ` [PATCH 15/16] tty: the rest, " Jiri Slaby
@ 2021-09-14  9:14   ` Jiri Slaby
  2021-09-16 10:03     ` Johan Hovold
  2021-09-14  9:17   ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Krzysztof Kozlowski
                     ` (10 subsequent siblings)
  18 siblings, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-09-14  9:14 UTC (permalink / raw)
  To: gregkh; +Cc: linux-serial, linux-kernel, Jiri Slaby

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, so remove tty_flip_buffer_push() completely.

One less exported function.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/tty_buffer.c | 17 -----------------
 include/linux/tty_flip.h |  1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 635d0af229b7..19b44639c464 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -550,23 +550,6 @@ static void flush_to_ldisc(struct work_struct *work)
 
 }
 
-/**
- *	tty_flip_buffer_push	-	terminal
- *	@port: tty port to push
- *
- *	Queue a push of the terminal flip buffers to the line discipline.
- *	Can be called from IRQ/atomic context.
- *
- *	In the event of the queue being busy for flipping the work will be
- *	held off and retried later.
- */
-
-void tty_flip_buffer_push(struct tty_port *port)
-{
-	tty_schedule_flip(port);
-}
-EXPORT_SYMBOL(tty_flip_buffer_push);
-
 /**
  *	tty_buffer_init		-	prepare a tty buffer structure
  *	@port: tty port to initialise
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index 9916acb5de49..7efef54df932 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -16,7 +16,6 @@ int tty_insert_flip_string_fixed_flag(struct tty_port *port,
 		const unsigned char *chars, char flag, size_t size);
 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);
 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 49+ messages in thread

* Re: [PATCH 06/16] tty: remove file from n_tty_ioctl_helper
  2021-09-14  9:11 ` [PATCH 06/16] tty: remove file from n_tty_ioctl_helper Jiri Slaby
@ 2021-09-14  9:15   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 49+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-14  9:15 UTC (permalink / raw)
  To: Jiri Slaby, gregkh
  Cc: linux-serial, linux-kernel, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, Paul Mackerras, David S. Miller,
	Jakub Kicinski

On 14/09/2021 11:11, Jiri Slaby wrote:
> After the previous patch, there are no users of 'file' in
> n_tty_ioctl_helper. So remove it also from there.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Cc: Johan Hedberg <johan.hedberg@gmail.com>
> Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  drivers/bluetooth/hci_ldisc.c | 2 +-
>  drivers/net/ppp/ppp_async.c   | 2 +-
>  drivers/net/ppp/ppp_synctty.c | 2 +-
>  drivers/tty/n_gsm.c           | 2 +-
>  drivers/tty/n_hdlc.c          | 2 +-
>  drivers/tty/n_tty.c           | 2 +-
>  drivers/tty/tty_ioctl.c       | 4 ++--
>  include/linux/tty.h           | 4 ++--
>  net/nfc/nci/uart.c            | 2 +-
>  9 files changed, 11 insertions(+), 11 deletions(-)
> 

For NFC:
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl
  2021-09-14  9:11 ` [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl Jiri Slaby
@ 2021-09-14  9:16   ` Krzysztof Kozlowski
  2021-09-15  8:02   ` Marc Kleine-Budde
  2021-09-21  4:00   ` Dmitry Torokhov
  2 siblings, 0 replies; 49+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-14  9:16 UTC (permalink / raw)
  To: Jiri Slaby, gregkh
  Cc: linux-serial, linux-kernel, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, Dmitry Torokhov, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Andreas Koensgen, Paul Mackerras

On 14/09/2021 11:11, Jiri Slaby wrote:
> After the previous patches, noone needs 'file' parameter in neither
> ioctl hook from tty_ldisc_ops. So remove 'file' from both of them.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Cc: Johan Hedberg <johan.hedberg@gmail.com>
> Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Wolfgang Grandegger <wg@grandegger.com>
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  drivers/bluetooth/hci_ldisc.c |  5 ++---
>  drivers/input/serio/serport.c |  5 ++---
>  drivers/net/can/slcan.c       |  4 ++--
>  drivers/net/hamradio/6pack.c  |  4 ++--
>  drivers/net/hamradio/mkiss.c  |  4 ++--
>  drivers/net/ppp/ppp_async.c   |  3 +--
>  drivers/net/ppp/ppp_synctty.c |  3 +--
>  drivers/net/slip/slip.c       |  4 ++--
>  drivers/tty/n_gsm.c           |  4 ++--
>  drivers/tty/n_hdlc.c          |  5 ++---
>  drivers/tty/n_tty.c           |  4 ++--
>  drivers/tty/tty_io.c          |  8 ++++----
>  include/linux/tty_ldisc.h     | 15 +++++++--------
>  net/nfc/nci/uart.c            |  5 ++---
>  14 files changed, 33 insertions(+), 40 deletions(-)
> 

For NFC:
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>



Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (7 preceding siblings ...)
  2021-09-14  9:14   ` [PATCH 16/16] tty: drop tty_flip_buffer_push Jiri Slaby
@ 2021-09-14  9:17   ` Krzysztof Kozlowski
  2021-09-14 12:54   ` Uwe Kleine-König
                     ` (9 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Krzysztof Kozlowski @ 2021-09-14  9:17 UTC (permalink / raw)
  To: Jiri Slaby, gregkh
  Cc: linux-serial, linux-kernel, Joel Stanley, Andrew Jeffery,
	Al Cooper, Matthias Brugger, Tobias Klauser, Russell King,
	Vineet Gupta, Richard Genoud, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko,
	Vladimir Zapolskiy, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Andreas Färber, Manivannan Sadhasivam, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Kevin Cernekee,
	Laxman Dewangan, Thierry Reding, Jonathan Hunter, Palmer Dabbelt,
	Paul Walmsley, Orson Zhai, Baolin Wang, Chunyan Zhang,
	Patrice Chotard, Maxime Coquelin, Alexandre Torgue,
	David S. Miller, Peter Korsgaard, Timur Tabi, Michal Simek

On 14/09/2021 11:14, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Andrew Jeffery <andrew@aj.id.au>
> Cc: Al Cooper <alcooperx@gmail.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Tobias Klauser <tklauser@distanz.ch>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Vineet Gupta <vgupta@kernel.org>
> Cc: Richard Genoud <richard.genoud@gmail.com>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: Alexander Shiyan <shc_work@mail.ru>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: Karol Gugala <kgugala@antmicro.com>
> Cc: Mateusz Holenko <mholenko@antmicro.com>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: "Andreas Färber" <afaerber@suse.de>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Kevin Cernekee <cernekee@gmail.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> Cc: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Orson Zhai <orsonzhai@gmail.com>
> Cc: Baolin Wang <baolin.wang7@gmail.com>
> Cc: Chunyan Zhang <zhang.lyra@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Peter Korsgaard <jacmet@sunsite.dk>
> Cc: Timur Tabi <timur@kernel.org>
> Cc: Michal Simek <michal.simek@xilinx.com>
> ---
>  drivers/tty/serial/21285.c                  |  2 +-
>  drivers/tty/serial/8250/8250_aspeed_vuart.c |  2 +-
>  drivers/tty/serial/8250/8250_bcm7271.c      |  2 +-
>  drivers/tty/serial/8250/8250_dma.c          |  2 +-
>  drivers/tty/serial/8250/8250_mtk.c          |  2 +-
>  drivers/tty/serial/8250/8250_omap.c         |  2 +-
>  drivers/tty/serial/8250/8250_port.c         |  2 +-
>  drivers/tty/serial/altera_jtaguart.c        |  2 +-
>  drivers/tty/serial/altera_uart.c            |  2 +-
>  drivers/tty/serial/amba-pl010.c             |  2 +-
>  drivers/tty/serial/amba-pl011.c             |  6 +++---
>  drivers/tty/serial/apbuart.c                |  2 +-
>  drivers/tty/serial/ar933x_uart.c            |  2 +-
>  drivers/tty/serial/arc_uart.c               |  2 +-
>  drivers/tty/serial/atmel_serial.c           |  6 +++---
>  drivers/tty/serial/bcm63xx_uart.c           |  2 +-
>  drivers/tty/serial/clps711x.c               |  2 +-
>  drivers/tty/serial/cpm_uart/cpm_uart_core.c |  2 +-
>  drivers/tty/serial/digicolor-usart.c        |  2 +-
>  drivers/tty/serial/dz.c                     |  2 +-
>  drivers/tty/serial/fsl_linflexuart.c        |  2 +-
>  drivers/tty/serial/fsl_lpuart.c             |  6 +++---
>  drivers/tty/serial/icom.c                   |  2 +-
>  drivers/tty/serial/imx.c                    |  6 +++---
>  drivers/tty/serial/ip22zilog.c              |  4 ++--
>  drivers/tty/serial/jsm/jsm_tty.c            |  2 +-
>  drivers/tty/serial/kgdb_nmi.c               |  2 +-
>  drivers/tty/serial/lantiq.c                 |  4 ++--
>  drivers/tty/serial/liteuart.c               |  2 +-
>  drivers/tty/serial/lpc32xx_hs.c             |  2 +-
>  drivers/tty/serial/max3100.c                |  4 ++--
>  drivers/tty/serial/max310x.c                |  2 +-
>  drivers/tty/serial/mcf.c                    |  2 +-
>  drivers/tty/serial/men_z135_uart.c          |  2 +-
>  drivers/tty/serial/meson_uart.c             |  2 +-
>  drivers/tty/serial/milbeaut_usio.c          |  2 +-
>  drivers/tty/serial/mpc52xx_uart.c           |  2 +-
>  drivers/tty/serial/mps2-uart.c              |  4 ++--
>  drivers/tty/serial/msm_serial.c             |  6 +++---
>  drivers/tty/serial/mux.c                    |  2 +-
>  drivers/tty/serial/mvebu-uart.c             |  2 +-
>  drivers/tty/serial/mxs-auart.c              |  4 ++--
>  drivers/tty/serial/omap-serial.c            |  2 +-
>  drivers/tty/serial/owl-uart.c               |  2 +-
>  drivers/tty/serial/pch_uart.c               |  4 ++--
>  drivers/tty/serial/pic32_uart.c             |  2 +-
>  drivers/tty/serial/pmac_zilog.c             |  4 ++--
>  drivers/tty/serial/pxa.c                    |  2 +-
>  drivers/tty/serial/qcom_geni_serial.c       |  4 ++--
>  drivers/tty/serial/rda-uart.c               |  2 +-
>  drivers/tty/serial/rp2.c                    |  2 +-
>  drivers/tty/serial/sa1100.c                 |  2 +-
>  drivers/tty/serial/samsung_tty.c            |  6 +++---

For Samsung:
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

BR,
Krzysztof

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 15/16] tty: the rest, stop using tty_flip_buffer_push
  2021-09-14  9:14   ` [PATCH 15/16] tty: the rest, " Jiri Slaby
@ 2021-09-14 11:58     ` Samuel Iglesias Gonsálvez
  0 siblings, 0 replies; 49+ messages in thread
From: Samuel Iglesias Gonsálvez @ 2021-09-14 11:58 UTC (permalink / raw)
  To: Jiri Slaby, gregkh
  Cc: linux-serial, linux-kernel, Arnd Bergmann, Jens Taprogge,
	Scott Branden, Ulf Hansson, David S. Miller, Jakub Kicinski,
	Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz

[-- Attachment #1: Type: text/plain, Size: 5487 bytes --]

On Tue, 2021-09-14 at 11:14 +0200, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We
> are
> going to remove the former, so call the latter directly in the couple
> of
> remaining users.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
> Cc: Jens Taprogge <jens.taprogge@taprogge.org>
> Cc: Scott Branden <scott.branden@broadcom.com>
> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Marcel Holtmann <marcel@holtmann.org>
> Cc: Johan Hedberg <johan.hedberg@gmail.com>
> Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
> ---
>  drivers/char/pcmcia/synclink_cs.c | 2 +-
>  drivers/ipack/devices/ipoctal.c   | 2 +-
>  drivers/misc/bcm-vk/bcm_vk_tty.c  | 2 +-
>  drivers/mmc/core/sdio_uart.c      | 2 +-
>  drivers/net/usb/hso.c             | 2 +-
>  net/bluetooth/rfcomm/tty.c        | 4 ++--
>  6 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/char/pcmcia/synclink_cs.c
> b/drivers/char/pcmcia/synclink_cs.c
> index 78baba55a8b5..29a7a89ee58d 100644
> --- a/drivers/char/pcmcia/synclink_cs.c
> +++ b/drivers/char/pcmcia/synclink_cs.c
> @@ -952,7 +952,7 @@ static void rx_ready_async(MGSLPC_INFO *info, int
> tcd)
>         }
>  
>         if (work)
> -               tty_flip_buffer_push(port);
> +               tty_schedule_flip(port);
>  }
>  
>  
> diff --git a/drivers/ipack/devices/ipoctal.c
> b/drivers/ipack/devices/ipoctal.c
> index c14e65a5d38f..714e2b8c551f 100644
> --- a/drivers/ipack/devices/ipoctal.c
> +++ b/drivers/ipack/devices/ipoctal.c
> @@ -184,7 +184,7 @@ static void ipoctal_irq_rx(struct ipoctal_channel
> *channel, u8 sr)
>                 sr = ioread8(&channel->regs->r.sr);
>         } while (isr & channel->isr_rx_rdy_mask);
>  
> -       tty_flip_buffer_push(port);
> +       tty_schedule_flip(port);
>  }
>  

For ipoctal changes:

Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>

Sam

>  static void ipoctal_irq_tx(struct ipoctal_channel *channel)
> diff --git a/drivers/misc/bcm-vk/bcm_vk_tty.c b/drivers/misc/bcm-
> vk/bcm_vk_tty.c
> index 1b6076a89ca6..328109a719be 100644
> --- a/drivers/misc/bcm-vk/bcm_vk_tty.c
> +++ b/drivers/misc/bcm-vk/bcm_vk_tty.c
> @@ -114,7 +114,7 @@ static void bcm_vk_tty_wq_handler(struct
> work_struct *work)
>                 }
>  
>                 if (count) {
> -                       tty_flip_buffer_push(&vktty->port);
> +                       tty_schedule_flip(&vktty->port);
>  
>                         /* Update read offset from shadow register to
> card */
>                         vkwrite32(vk, vktty->rd, BAR_1,
> diff --git a/drivers/mmc/core/sdio_uart.c
> b/drivers/mmc/core/sdio_uart.c
> index 04c0823e0359..55fc67bd0937 100644
> --- a/drivers/mmc/core/sdio_uart.c
> +++ b/drivers/mmc/core/sdio_uart.c
> @@ -418,7 +418,7 @@ static void sdio_uart_receive_chars(struct
> sdio_uart_port *port,
>                 *status = sdio_in(port, UART_LSR);
>         } while ((*status & UART_LSR_DR) && (max_count-- > 0));
>  
> -       tty_flip_buffer_push(&port->port);
> +       tty_schedule_flip(&port->port);
>  }
>  
>  static void sdio_uart_transmit_chars(struct sdio_uart_port *port)
> diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
> index 7dc1ef3f93c3..55ea64b162e1 100644
> --- a/drivers/net/usb/hso.c
> +++ b/drivers/net/usb/hso.c
> @@ -2018,7 +2018,7 @@ static int put_rxbuf_data(struct urb *urb,
> struct hso_serial *serial)
>         if (count >= urb->actual_length) {
>                 tty_insert_flip_string(&serial->port, urb-
> >transfer_buffer,
>                                        urb->actual_length);
> -               tty_flip_buffer_push(&serial->port);
> +               tty_schedule_flip(&serial->port);
>         } else {
>                 dev_warn(&serial->parent->usb->dev,
>                          "dropping data, %d bytes lost\n", urb-
> >actual_length);
> diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
> index ebd78fdbd6e8..2a09637bdb00 100644
> --- a/net/bluetooth/rfcomm/tty.c
> +++ b/net/bluetooth/rfcomm/tty.c
> @@ -618,7 +618,7 @@ static void rfcomm_dev_data_ready(struct
> rfcomm_dlc *dlc, struct sk_buff *skb)
>         BT_DBG("dlc %p len %d", dlc, skb->len);
>  
>         tty_insert_flip_string(&dev->port, skb->data, skb->len);
> -       tty_flip_buffer_push(&dev->port);
> +       tty_schedule_flip(&dev->port);
>  
>         kfree_skb(skb);
>  }
> @@ -677,7 +677,7 @@ static void rfcomm_tty_copy_pending(struct
> rfcomm_dev *dev)
>         rfcomm_dlc_unlock(dev->dlc);
>  
>         if (inserted > 0)
> -               tty_flip_buffer_push(&dev->port);
> +               tty_schedule_flip(&dev->port);
>  }
>  
>  /* do the reverse of install, clearing the tty fields and releasing
> the


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (8 preceding siblings ...)
  2021-09-14  9:17   ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Krzysztof Kozlowski
@ 2021-09-14 12:54   ` Uwe Kleine-König
  2021-09-14 13:53   ` Richard Genoud
                     ` (8 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Uwe Kleine-König @ 2021-09-14 12:54 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, Alexandre Belloni, Mateusz Holenko, Neil Armstrong,
	Benjamin Herrenschmidt, Al Cooper, Liviu Dudau, Baruch Siach,
	Nicolas Ferre, Laxman Dewangan, Paul Mackerras, Michael Ellerman,
	Peter Korsgaard, Michal Simek, Karol Gugala, Jerome Brunet,
	Florian Fainelli, Alexander Shiyan, Krzysztof Kozlowski,
	Alexandre Torgue, Fabio Estevam, Kevin Cernekee, Russell King,
	Jonathan Hunter, Ludovic Desroches, Andy Gross,
	bcm-kernel-feedback-list, Joel Stanley, linux-serial,
	Vineet Gupta, Orson Zhai, Tobias Klauser, Patrice Chotard,
	NXP Linux Team, Maxime Coquelin, Manivannan Sadhasivam,
	Martin Blumenstingl, Sascha Hauer, Sudeep Holla,
	Vladimir Zapolskiy, Lorenzo Pieralisi, Paul Walmsley,
	Matthias Brugger, Bjorn Andersson, Timur Tabi, Andrew Jeffery,
	Chunyan Zhang, linux-kernel, David S. Miller, Richard Genoud,
	Thierry Reding, Palmer Dabbelt, Pengutronix Kernel Team,
	Kevin Hilman, Baolin Wang, Shawn Guo, Andreas Färber,
	Maciej W. Rozycki

[-- Attachment #1: Type: text/plain, Size: 590 bytes --]

Hello Jiri,

On Tue, Sep 14, 2021 at 11:14:07AM +0200, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [greybus-dev] [PATCH 14/16] tty: drivers/staging/, stop using tty_flip_buffer_push
  2021-09-14  9:14   ` [PATCH 14/16] tty: drivers/staging/, " Jiri Slaby
@ 2021-09-14 13:19     ` Alex Elder
  0 siblings, 0 replies; 49+ messages in thread
From: Alex Elder @ 2021-09-14 13:19 UTC (permalink / raw)
  To: Jiri Slaby, gregkh
  Cc: Alex Elder, linux-staging, Johan Hovold, linux-kernel,
	greybus-dev, linux-serial, David Lin

On 9/14/21 4:14 AM, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/staging/.

For "greybus/uart.c", looks good.

Reviewed-by: Alex Elder <elder@linaro.org>

> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: David Lin <dtwlin@gmail.com>
> Cc: Johan Hovold <johan@kernel.org>
> Cc: Alex Elder <elder@kernel.org>
> Cc: linux-staging@lists.linux.dev
> Cc: greybus-dev@lists.linaro.org
> ---
>  drivers/staging/fwserial/fwserial.c | 4 ++--
>  drivers/staging/gdm724x/gdm_tty.c   | 2 +-
>  drivers/staging/greybus/uart.c      | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
> index e8fa7f53cd5e..b2d3f95edbc3 100644
> --- a/drivers/staging/fwserial/fwserial.c
> +++ b/drivers/staging/fwserial/fwserial.c
> @@ -518,7 +518,7 @@ static void fwtty_emit_breaks(struct work_struct *work)
>  		if (c < t)
>  			break;
>  	}
> -	tty_flip_buffer_push(&port->port);
> +	tty_schedule_flip(&port->port);
>  
>  	if (port->mstatus & (UART_LSR_BI << 24))
>  		schedule_delayed_work(&port->emit_breaks, FREQ_BREAKS);
> @@ -565,7 +565,7 @@ static int fwtty_rx(struct fwtty_port *port, unsigned char *data, size_t len)
>  
>  	c = tty_insert_flip_string_fixed_flag(&port->port, data, TTY_NORMAL, n);
>  	if (c > 0)
> -		tty_flip_buffer_push(&port->port);
> +		tty_schedule_flip(&port->port);
>  	n -= c;
>  
>  	if (n) {
> diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
> index 04df6f9f5403..95a3b4e61fec 100644
> --- a/drivers/staging/gdm724x/gdm_tty.c
> +++ b/drivers/staging/gdm724x/gdm_tty.c
> @@ -129,7 +129,7 @@ static int gdm_tty_recv_complete(void *data,
>  	if (data && len) {
>  		if (tty_buffer_request_room(&gdm->port, len) == len) {
>  			tty_insert_flip_string(&gdm->port, data, len);
> -			tty_flip_buffer_push(&gdm->port);
> +			tty_schedule_flip(&gdm->port);
>  		} else {
>  			return TO_HOST_BUFFER_REQUEST_FAIL;
>  		}
> diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
> index e6d860a9678e..2bdc2401b652 100644
> --- a/drivers/staging/greybus/uart.c
> +++ b/drivers/staging/greybus/uart.c
> @@ -122,7 +122,7 @@ static int gb_uart_receive_data_handler(struct gb_operation *op)
>  			recv_data_size, count);
>  	}
>  	if (count)
> -		tty_flip_buffer_push(port);
> +		tty_schedule_flip(port);
>  	return 0;
>  }
>  
> 


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (9 preceding siblings ...)
  2021-09-14 12:54   ` Uwe Kleine-König
@ 2021-09-14 13:53   ` Richard Genoud
  2021-09-15 17:00   ` Tobias Klauser
                     ` (7 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Richard Genoud @ 2021-09-14 13:53 UTC (permalink / raw)
  To: Jiri Slaby, gregkh
  Cc: linux-serial, linux-kernel, Joel Stanley, Andrew Jeffery,
	Al Cooper, Matthias Brugger, Tobias Klauser, Russell King,
	Vineet Gupta, Richard Genoud, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko,
	Vladimir Zapolskiy, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Andreas Färber, Manivannan Sadhasivam, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Kevin Cernekee,
	Krzysztof Kozlowski, Laxman Dewangan, Thierry Reding,
	Jonathan Hunter, Palmer Dabbelt, Paul Walmsley, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Patrice Chotard, Maxime Coquelin,
	Alexandre Torgue, David S. Miller, Peter Korsgaard, Timur Tabi,
	Michal Simek

Le 14/09/2021 à 11:14, Jiri Slaby a écrit :
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>

For Atmel:
Acked-by: Richard Genoud <richard.genoud@gmail.com>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 09/16] tty: drivers/tty/, stop using tty_flip_buffer_push
  2021-09-14  9:14   ` [PATCH 09/16] tty: drivers/tty/, " Jiri Slaby
@ 2021-09-14 16:06     ` David Sterba
  0 siblings, 0 replies; 49+ messages in thread
From: David Sterba @ 2021-09-14 16:06 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, linux-serial, linux-kernel, Laurentiu Tudor, Jiri Kosina,
	David Sterba, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, David S. Miller

On Tue, Sep 14, 2021 at 11:14:08AM +0200, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in the rest of
> drivers/tty/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: David Sterba <dsterba@suse.com>

For drivers/tty/ipwireless/*

Acked-by: David Sterba <dsterba@suse.com>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl
  2021-09-14  9:11 ` [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl Jiri Slaby
  2021-09-14  9:16   ` Krzysztof Kozlowski
@ 2021-09-15  8:02   ` Marc Kleine-Budde
  2021-09-21  4:00   ` Dmitry Torokhov
  2 siblings, 0 replies; 49+ messages in thread
From: Marc Kleine-Budde @ 2021-09-15  8:02 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, linux-serial, linux-kernel, Marcel Holtmann,
	Johan Hedberg, Luiz Augusto von Dentz, Dmitry Torokhov,
	Wolfgang Grandegger, David S. Miller, Jakub Kicinski,
	Andreas Koensgen, Paul Mackerras, Krzysztof Kozlowski

[-- Attachment #1: Type: text/plain, Size: 1387 bytes --]

On 14.09.2021 11:11:25, Jiri Slaby wrote:
> After the previous patches, noone needs 'file' parameter in neither
> ioctl hook from tty_ldisc_ops. So remove 'file' from both of them.
> 
[...]
> diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
> index 9a4ebda30510..de2da1b09a79 100644
> --- a/drivers/net/can/slcan.c
> +++ b/drivers/net/can/slcan.c
> @@ -670,8 +670,8 @@ static void slcan_hangup(struct tty_struct *tty)
>  }
>  
>  /* Perform I/O control on an active SLCAN channel. */
> -static int slcan_ioctl(struct tty_struct *tty, struct file *file,
> -		       unsigned int cmd, unsigned long arg)
> +static int slcan_ioctl(struct tty_struct *tty, unsigned int cmd,
> +		unsigned long arg)
>  {
>  	struct slcan *sl = (struct slcan *) tty->disc_data;
>  	unsigned int tmp;

nitpick:
Checkpatch complains about this:

| CHECK: Alignment should match open parenthesis
| #674: FILE: drivers/net/can/slcan.c:674:
| +static int slcan_ioctl(struct tty_struct *tty, unsigned int cmd,
| +               unsigned long arg)

Same for other hunks in this file.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void
  2021-09-14  9:11 ` [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void Jiri Slaby
@ 2021-09-15  8:05   ` Marc Kleine-Budde
  2021-09-15 11:48   ` Mark Brown
  2021-09-21  3:59   ` Dmitry Torokhov
  2 siblings, 0 replies; 49+ messages in thread
From: Marc Kleine-Budde @ 2021-09-15  8:05 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, linux-serial, linux-kernel, Dmitry Torokhov,
	Wolfgang Grandegger, David S. Miller, Jakub Kicinski,
	Paul Mackerras, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Peter Ujfalusi

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

On 14.09.2021 11:11:22, Jiri Slaby wrote:
> The documentation says that the return value of tty_ldisc_ops::hangup
> hook is ignored. And it really is, so there is no point for its return
> type to be int. Switch it to void and all the hooks too.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Wolfgang Grandegger <wg@grandegger.com>
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
> ---
>  Documentation/driver-api/serial/tty.rst | 2 +-
>  drivers/input/serio/serport.c           | 3 +--
>  drivers/net/can/slcan.c                 | 3 +--

For the slcan.c:
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 05/16] tty: remove file from tty_mode_ioctl
  2021-09-14  9:11 ` [PATCH 05/16] tty: remove file from tty_mode_ioctl Jiri Slaby
@ 2021-09-15  8:05   ` Marc Kleine-Budde
  0 siblings, 0 replies; 49+ messages in thread
From: Marc Kleine-Budde @ 2021-09-15  8:05 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, linux-serial, linux-kernel, Wolfgang Grandegger,
	David S. Miller, Jakub Kicinski, Andreas Koensgen,
	Paul Mackerras

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

On 14.09.2021 11:11:23, Jiri Slaby wrote:
> The only user of 'file' parameter in tty_mode_ioctl is a BUG_ON check.
> Provided it never crashed for anyone, it's an overkill to pass the
> parameter to tty_mode_ioctl only for this check.
>
> If we wanted to check 'file' there, we should handle it in more graceful
> way anyway. Not by a BUG == crash.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Wolfgang Grandegger <wg@grandegger.com>
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de>
> Cc: Paul Mackerras <paulus@samba.org>
> ---
>  drivers/net/can/slcan.c       | 2 +-

For the slcan.c:
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>

regards,
Marc

--
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 12/16] tty: arch/, stop using tty_flip_buffer_push
  2021-09-14  9:14   ` [PATCH 12/16] tty: arch/, " Jiri Slaby
@ 2021-09-15  8:10       ` Max Filippov
  0 siblings, 0 replies; 49+ messages in thread
From: Max Filippov @ 2021-09-15  8:10 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Greg Kroah-Hartman, linux-serial, LKML, James E.J. Bottomley,
	Helge Deller, Jeff Dike, Richard Weinberger, Anton Ivanov,
	Chris Zankel, open list:PARISC ARCHITECTURE, linux-um,
	open list:TENSILICA XTENSA PORT (xtensa)

On Tue, Sep 14, 2021 at 2:14 AM Jiri Slaby <jslaby@suse.cz> wrote:
>
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in arch/.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
> Cc: Helge Deller <deller@gmx.de>
> Cc: Jeff Dike <jdike@addtoit.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
> Cc: Chris Zankel <chris@zankel.net>
> Cc: Max Filippov <jcmvbkbc@gmail.com>
> Cc: linux-parisc@vger.kernel.org
> Cc: linux-um@lists.infradead.org
> Cc: linux-xtensa@linux-xtensa.org
> ---

>  arch/xtensa/platforms/iss/console.c | 2 +-

Acked-by: Max Filippov <jcmvbkbc@gmail.com>

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 12/16] tty: arch/, stop using tty_flip_buffer_push
@ 2021-09-15  8:10       ` Max Filippov
  0 siblings, 0 replies; 49+ messages in thread
From: Max Filippov @ 2021-09-15  8:10 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Greg Kroah-Hartman, linux-serial, LKML, James E.J. Bottomley,
	Helge Deller, Jeff Dike, Richard Weinberger, Anton Ivanov,
	Chris Zankel, open list:PARISC ARCHITECTURE, linux-um,
	open list:TENSILICA XTENSA PORT (xtensa)

On Tue, Sep 14, 2021 at 2:14 AM Jiri Slaby <jslaby@suse.cz> wrote:
>
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in arch/.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
> Cc: Helge Deller <deller@gmx.de>
> Cc: Jeff Dike <jdike@addtoit.com>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
> Cc: Chris Zankel <chris@zankel.net>
> Cc: Max Filippov <jcmvbkbc@gmail.com>
> Cc: linux-parisc@vger.kernel.org
> Cc: linux-um@lists.infradead.org
> Cc: linux-xtensa@linux-xtensa.org
> ---

>  arch/xtensa/platforms/iss/console.c | 2 +-

Acked-by: Max Filippov <jcmvbkbc@gmail.com>

-- 
Thanks.
-- Max

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void
  2021-09-14  9:11 ` [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void Jiri Slaby
  2021-09-15  8:05   ` Marc Kleine-Budde
@ 2021-09-15 11:48   ` Mark Brown
  2021-09-21  3:59   ` Dmitry Torokhov
  2 siblings, 0 replies; 49+ messages in thread
From: Mark Brown @ 2021-09-15 11:48 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, linux-serial, linux-kernel, Dmitry Torokhov,
	Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
	Jakub Kicinski, Paul Mackerras, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, Peter Ujfalusi

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

On Tue, Sep 14, 2021 at 11:11:22AM +0200, Jiri Slaby wrote:
> The documentation says that the return value of tty_ldisc_ops::hangup
> hook is ignored. And it really is, so there is no point for its return
> type to be int. Switch it to void and all the hooks too.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (10 preceding siblings ...)
  2021-09-14 13:53   ` Richard Genoud
@ 2021-09-15 17:00   ` Tobias Klauser
  2021-09-15 17:53   ` Andreas Färber
                     ` (6 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Tobias Klauser @ 2021-09-15 17:00 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, linux-serial, linux-kernel, Joel Stanley, Andrew Jeffery,
	Al Cooper, Matthias Brugger, Russell King, Vineet Gupta,
	Richard Genoud, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko,
	Vladimir Zapolskiy, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Andreas Färber, Manivannan Sadhasivam, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Kevin Cernekee,
	Krzysztof Kozlowski, Laxman Dewangan, Thierry Reding,
	Jonathan Hunter, Palmer Dabbelt, Paul Walmsley, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Patrice Chotard, Maxime Coquelin,
	Alexandre Torgue, David S. Miller, Peter Korsgaard, Timur Tabi,
	Michal Simek

On 2021-09-14 at 11:14:07 +0200, Jiri Slaby <jslaby@suse.cz> wrote:
[...]
>  drivers/tty/serial/altera_jtaguart.c        |  2 +-
>  drivers/tty/serial/altera_uart.c            |  2 +-

for these:

Acked-by: Tobias Klauser <tklauser@distanz.ch>

Thank you

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (11 preceding siblings ...)
  2021-09-15 17:00   ` Tobias Klauser
@ 2021-09-15 17:53   ` Andreas Färber
  2021-09-15 23:43   ` Andrew Jeffery
                     ` (5 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Andreas Färber @ 2021-09-15 17:53 UTC (permalink / raw)
  To: Jiri Slaby, gregkh
  Cc: linux-serial, linux-kernel, Joel Stanley, Andrew Jeffery,
	Al Cooper, Matthias Brugger, Tobias Klauser, Russell King,
	Vineet Gupta, Richard Genoud, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko,
	Vladimir Zapolskiy, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Manivannan Sadhasivam, Michael Ellerman, Benjamin Herrenschmidt,
	Paul Mackerras, Kevin Cernekee, Krzysztof Kozlowski,
	Laxman Dewangan, Thierry Reding, Jonathan Hunter, Palmer Dabbelt,
	Paul Walmsley, Orson Zhai, Baolin Wang, Chunyan Zhang,
	Patrice Chotard, Maxime Coquelin, Alexandre Torgue,
	David S. Miller, Peter Korsgaard, Timur Tabi, Michal Simek

On 14.09.21 11:14, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Andrew Jeffery <andrew@aj.id.au>
> Cc: Al Cooper <alcooperx@gmail.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Tobias Klauser <tklauser@distanz.ch>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Vineet Gupta <vgupta@kernel.org>
> Cc: Richard Genoud <richard.genoud@gmail.com>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: Alexander Shiyan <shc_work@mail.ru>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: Karol Gugala <kgugala@antmicro.com>
> Cc: Mateusz Holenko <mholenko@antmicro.com>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: "Andreas Färber" <afaerber@suse.de>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Kevin Cernekee <cernekee@gmail.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> Cc: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Orson Zhai <orsonzhai@gmail.com>
> Cc: Baolin Wang <baolin.wang7@gmail.com>
> Cc: Chunyan Zhang <zhang.lyra@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Peter Korsgaard <jacmet@sunsite.dk>
> Cc: Timur Tabi <timur@kernel.org>
> Cc: Michal Simek <michal.simek@xilinx.com>
> ---

Acked-by: Andreas Färber <afaerber@suse.de> # owl, rda

Thanks,
Andreas

-- 
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (12 preceding siblings ...)
  2021-09-15 17:53   ` Andreas Färber
@ 2021-09-15 23:43   ` Andrew Jeffery
  2021-09-16  7:13   ` Nicolas Ferre
                     ` (4 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Andrew Jeffery @ 2021-09-15 23:43 UTC (permalink / raw)
  To: Jiri Slaby, Greg Kroah-Hartman
  Cc: linux-serial, linux-kernel, Joel Stanley, Al Cooper,
	Matthias Brugger, Tobias Klauser, Russell King, Vineet Gupta,
	Richard Genoud, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko,
	Vladimir Zapolskiy, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Andreas Färber, Manivannan Sadhasivam, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Kevin Cernekee,
	Krzysztof Kozlowski, Laxman Dewangan, Thierry Reding,
	Jonathan Hunter, Palmer Dabbelt, Paul Walmsley, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Patrice Chotard, Maxime Coquelin,
	Alexandre Torgue, David Miller, Peter Korsgaard, Timur Tabi,
	Michal Simek



On Tue, 14 Sep 2021, at 18:44, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Andrew Jeffery <andrew@aj.id.au>
> Cc: Al Cooper <alcooperx@gmail.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Tobias Klauser <tklauser@distanz.ch>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Vineet Gupta <vgupta@kernel.org>
> Cc: Richard Genoud <richard.genoud@gmail.com>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: Alexander Shiyan <shc_work@mail.ru>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: Karol Gugala <kgugala@antmicro.com>
> Cc: Mateusz Holenko <mholenko@antmicro.com>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: "Andreas Färber" <afaerber@suse.de>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Kevin Cernekee <cernekee@gmail.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> Cc: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Orson Zhai <orsonzhai@gmail.com>
> Cc: Baolin Wang <baolin.wang7@gmail.com>
> Cc: Chunyan Zhang <zhang.lyra@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Peter Korsgaard <jacmet@sunsite.dk>
> Cc: Timur Tabi <timur@kernel.org>
> Cc: Michal Simek <michal.simek@xilinx.com>
> ---
>  drivers/tty/serial/21285.c                  |  2 +-
>  drivers/tty/serial/8250/8250_aspeed_vuart.c |  2 +-

For the Aspeed change:

Acked-by: Andrew Jeffery <andrew@aj.id.au>

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (13 preceding siblings ...)
  2021-09-15 23:43   ` Andrew Jeffery
@ 2021-09-16  7:13   ` Nicolas Ferre
  2021-09-16  7:32   ` Chunyan Zhang
                     ` (3 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Nicolas Ferre @ 2021-09-16  7:13 UTC (permalink / raw)
  To: Jiri Slaby, gregkh
  Cc: linux-serial, linux-kernel, Joel Stanley, Andrew Jeffery,
	Al Cooper, Matthias Brugger, Tobias Klauser, Russell King,
	Vineet Gupta, Richard Genoud, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko,
	Vladimir Zapolskiy, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Andreas Färber, Manivannan Sadhasivam, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Kevin Cernekee,
	Krzysztof Kozlowski, Laxman Dewangan, Thierry Reding,
	Jonathan Hunter, Palmer Dabbelt, Paul Walmsley, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Patrice Chotard, Maxime Coquelin,
	Alexandre Torgue, David S. Miller, Peter Korsgaard, Timur Tabi,
	Michal Simek

On 14/09/2021 at 11:14, Jiri Slaby wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Andrew Jeffery <andrew@aj.id.au>
> Cc: Al Cooper <alcooperx@gmail.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Tobias Klauser <tklauser@distanz.ch>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Vineet Gupta <vgupta@kernel.org>
> Cc: Richard Genoud <richard.genoud@gmail.com>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>

[..]

For:

>   drivers/tty/serial/atmel_serial.c           |  6 +++---

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Regards,
-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (14 preceding siblings ...)
  2021-09-16  7:13   ` Nicolas Ferre
@ 2021-09-16  7:32   ` Chunyan Zhang
  2021-09-16  7:48   ` Neil Armstrong
                     ` (2 subsequent siblings)
  18 siblings, 0 replies; 49+ messages in thread
From: Chunyan Zhang @ 2021-09-16  7:32 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Greg Kroah-Hartman, open list:SERIAL DRIVERS,
	Linux Kernel Mailing List, Joel Stanley, Andrew Jeffery,
	Al Cooper, Matthias Brugger, Tobias Klauser, Russell King,
	Vineet Gupta, Richard Genoud, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko,
	Vladimir Zapolskiy, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Andreas Färber, Manivannan Sadhasivam, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Kevin Cernekee,
	Krzysztof Kozlowski, Laxman Dewangan, Thierry Reding,
	Jonathan Hunter, Palmer Dabbelt, Paul Walmsley, Orson Zhai,
	Baolin Wang, Patrice Chotard, Maxime Coquelin, Alexandre Torgue,
	David S. Miller, Peter Korsgaard, Timur Tabi, Michal Simek

On Tue, 14 Sept 2021 at 17:14, Jiri Slaby <jslaby@suse.cz> wrote:
>
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Andrew Jeffery <andrew@aj.id.au>
> Cc: Al Cooper <alcooperx@gmail.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Tobias Klauser <tklauser@distanz.ch>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Vineet Gupta <vgupta@kernel.org>
> Cc: Richard Genoud <richard.genoud@gmail.com>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: Alexander Shiyan <shc_work@mail.ru>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: Karol Gugala <kgugala@antmicro.com>
> Cc: Mateusz Holenko <mholenko@antmicro.com>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: "Andreas Färber" <afaerber@suse.de>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Kevin Cernekee <cernekee@gmail.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> Cc: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Orson Zhai <orsonzhai@gmail.com>
> Cc: Baolin Wang <baolin.wang7@gmail.com>
> Cc: Chunyan Zhang <zhang.lyra@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Peter Korsgaard <jacmet@sunsite.dk>
> Cc: Timur Tabi <timur@kernel.org>
> Cc: Michal Simek <michal.simek@xilinx.com>
> ---

[snip]

For:

>  drivers/tty/serial/sprd_serial.c            |  4 ++--

Acked-by: Chunyan Zhang <zhang.lyra@gmail.com>

Thanks,
Chunyan

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (15 preceding siblings ...)
  2021-09-16  7:32   ` Chunyan Zhang
@ 2021-09-16  7:48   ` Neil Armstrong
  2021-09-16 12:54   ` Russell King (Oracle)
  2021-09-16 20:30   ` Vladimir Zapolskiy
  18 siblings, 0 replies; 49+ messages in thread
From: Neil Armstrong @ 2021-09-16  7:48 UTC (permalink / raw)
  To: Jiri Slaby, gregkh
  Cc: linux-serial, linux-kernel, Joel Stanley, Andrew Jeffery,
	Al Cooper, Matthias Brugger, Tobias Klauser, Russell King,
	Vineet Gupta, Richard Genoud, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko,
	Vladimir Zapolskiy, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Andreas Färber, Manivannan Sadhasivam, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Kevin Cernekee,
	Krzysztof Kozlowski, Laxman Dewangan, Thierry Reding,
	Jonathan Hunter, Palmer Dabbelt, Paul Walmsley, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Patrice Chotard, Maxime Coquelin,
	Alexandre Torgue, David S. Miller, Peter Korsgaard, Timur Tabi,
	Michal Simek

On 14/09/2021 11:14, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Andrew Jeffery <andrew@aj.id.au>
> Cc: Al Cooper <alcooperx@gmail.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Tobias Klauser <tklauser@distanz.ch>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Vineet Gupta <vgupta@kernel.org>
> Cc: Richard Genoud <richard.genoud@gmail.com>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: Alexander Shiyan <shc_work@mail.ru>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: Karol Gugala <kgugala@antmicro.com>
> Cc: Mateusz Holenko <mholenko@antmicro.com>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: "Andreas Färber" <afaerber@suse.de>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Kevin Cernekee <cernekee@gmail.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> Cc: Laxman Dewangan <ldewangan@nvidia.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Paul Walmsley <paul.walmsley@sifive.com>
> Cc: Orson Zhai <orsonzhai@gmail.com>
> Cc: Baolin Wang <baolin.wang7@gmail.com>
> Cc: Chunyan Zhang <zhang.lyra@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Peter Korsgaard <jacmet@sunsite.dk>
> Cc: Timur Tabi <timur@kernel.org>
> Cc: Michal Simek <michal.simek@xilinx.com>
> ---
>  drivers/tty/serial/21285.c                  |  2 +-
>  drivers/tty/serial/8250/8250_aspeed_vuart.c |  2 +-
>  drivers/tty/serial/8250/8250_bcm7271.c      |  2 +-
>  drivers/tty/serial/8250/8250_dma.c          |  2 +-
>  drivers/tty/serial/8250/8250_mtk.c          |  2 +-
>  drivers/tty/serial/8250/8250_omap.c         |  2 +-
>  drivers/tty/serial/8250/8250_port.c         |  2 +-
>  drivers/tty/serial/altera_jtaguart.c        |  2 +-
>  drivers/tty/serial/altera_uart.c            |  2 +-
>  drivers/tty/serial/amba-pl010.c             |  2 +-
>  drivers/tty/serial/amba-pl011.c             |  6 +++---
>  drivers/tty/serial/apbuart.c                |  2 +-
>  drivers/tty/serial/ar933x_uart.c            |  2 +-
>  drivers/tty/serial/arc_uart.c               |  2 +-
>  drivers/tty/serial/atmel_serial.c           |  6 +++---
>  drivers/tty/serial/bcm63xx_uart.c           |  2 +-
>  drivers/tty/serial/clps711x.c               |  2 +-
>  drivers/tty/serial/cpm_uart/cpm_uart_core.c |  2 +-
>  drivers/tty/serial/digicolor-usart.c        |  2 +-
>  drivers/tty/serial/dz.c                     |  2 +-
>  drivers/tty/serial/fsl_linflexuart.c        |  2 +-
>  drivers/tty/serial/fsl_lpuart.c             |  6 +++---
>  drivers/tty/serial/icom.c                   |  2 +-
>  drivers/tty/serial/imx.c                    |  6 +++---
>  drivers/tty/serial/ip22zilog.c              |  4 ++--
>  drivers/tty/serial/jsm/jsm_tty.c            |  2 +-
>  drivers/tty/serial/kgdb_nmi.c               |  2 +-
>  drivers/tty/serial/lantiq.c                 |  4 ++--
>  drivers/tty/serial/liteuart.c               |  2 +-
>  drivers/tty/serial/lpc32xx_hs.c             |  2 +-
>  drivers/tty/serial/max3100.c                |  4 ++--
>  drivers/tty/serial/max310x.c                |  2 +-
>  drivers/tty/serial/mcf.c                    |  2 +-
>  drivers/tty/serial/men_z135_uart.c          |  2 +-
>  drivers/tty/serial/meson_uart.c             |  2 +-
>  drivers/tty/serial/milbeaut_usio.c          |  2 +-
>  drivers/tty/serial/mpc52xx_uart.c           |  2 +-
>  drivers/tty/serial/mps2-uart.c              |  4 ++--
>  drivers/tty/serial/msm_serial.c             |  6 +++---
>  drivers/tty/serial/mux.c                    |  2 +-
>  drivers/tty/serial/mvebu-uart.c             |  2 +-
>  drivers/tty/serial/mxs-auart.c              |  4 ++--
>  drivers/tty/serial/omap-serial.c            |  2 +-
>  drivers/tty/serial/owl-uart.c               |  2 +-
>  drivers/tty/serial/pch_uart.c               |  4 ++--
>  drivers/tty/serial/pic32_uart.c             |  2 +-
>  drivers/tty/serial/pmac_zilog.c             |  4 ++--
>  drivers/tty/serial/pxa.c                    |  2 +-
>  drivers/tty/serial/qcom_geni_serial.c       |  4 ++--
>  drivers/tty/serial/rda-uart.c               |  2 +-
>  drivers/tty/serial/rp2.c                    |  2 +-
>  drivers/tty/serial/sa1100.c                 |  2 +-
>  drivers/tty/serial/samsung_tty.c            |  6 +++---
>  drivers/tty/serial/sb1250-duart.c           |  2 +-
>  drivers/tty/serial/sc16is7xx.c              |  2 +-
>  drivers/tty/serial/sccnxp.c                 |  2 +-
>  drivers/tty/serial/serial-tegra.c           |  2 +-
>  drivers/tty/serial/serial_core.c            |  2 +-
>  drivers/tty/serial/serial_txx9.c            |  2 +-
>  drivers/tty/serial/sh-sci.c                 | 12 ++++++------
>  drivers/tty/serial/sifive.c                 |  2 +-
>  drivers/tty/serial/sprd_serial.c            |  4 ++--
>  drivers/tty/serial/st-asc.c                 |  2 +-
>  drivers/tty/serial/stm32-usart.c            |  2 +-
>  drivers/tty/serial/sunhv.c                  |  2 +-
>  drivers/tty/serial/sunsab.c                 |  2 +-
>  drivers/tty/serial/sunsu.c                  |  2 +-
>  drivers/tty/serial/sunzilog.c               |  4 ++--
>  drivers/tty/serial/tegra-tcu.c              |  2 +-
>  drivers/tty/serial/timbuart.c               |  2 +-
>  drivers/tty/serial/uartlite.c               |  2 +-
>  drivers/tty/serial/ucc_uart.c               |  2 +-
>  drivers/tty/serial/vr41xx_siu.c             |  2 +-
>  drivers/tty/serial/vt8500_serial.c          |  2 +-
>  drivers/tty/serial/xilinx_uartps.c          |  2 +-
>  drivers/tty/serial/zs.c                     |  2 +-
>  76 files changed, 103 insertions(+), 103 deletions(-)

For meson_uart:

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Neil

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 16/16] tty: drop tty_flip_buffer_push
  2021-09-14  9:14   ` [PATCH 16/16] tty: drop tty_flip_buffer_push Jiri Slaby
@ 2021-09-16 10:03     ` Johan Hovold
  2021-09-22  6:57       ` Jiri Slaby
  0 siblings, 1 reply; 49+ messages in thread
From: Johan Hovold @ 2021-09-16 10:03 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: gregkh, linux-serial, linux-kernel

On Tue, Sep 14, 2021 at 11:14:15AM +0200, Jiri Slaby wrote:
> 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, so remove tty_flip_buffer_push() completely.

Did you consider inlining tty_flip_buffer_push() or unexporting
tty_schedule_flip() instead?

The name tty_flip_buffer_push() is arguable more descriptive since the
work may already be running and is also less tied to the implementation.

The ratio of drivers using tty_flip_buffer_push() over
tty_schedule_flip() is also something like 186 to 15 so that would
amount to a lot less churn too.

Also, can you please start adding cover letters to your series to
provide an overview of what it is you're trying to accomplish?

Johan

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (16 preceding siblings ...)
  2021-09-16  7:48   ` Neil Armstrong
@ 2021-09-16 12:54   ` Russell King (Oracle)
  2021-09-16 20:30   ` Vladimir Zapolskiy
  18 siblings, 0 replies; 49+ messages in thread
From: Russell King (Oracle) @ 2021-09-16 12:54 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, linux-serial, linux-kernel, Joel Stanley, Andrew Jeffery,
	Al Cooper, Matthias Brugger, Tobias Klauser, Vineet Gupta,
	Richard Genoud, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko,
	Vladimir Zapolskiy, Neil Armstrong, Kevin Hilman, Jerome Brunet,
	Martin Blumenstingl, Liviu Dudau, Sudeep Holla,
	Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Andreas Färber, Manivannan Sadhasivam, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Kevin Cernekee,
	Krzysztof Kozlowski, Laxman Dewangan, Thierry Reding,
	Jonathan Hunter, Palmer Dabbelt, Paul Walmsley, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Patrice Chotard, Maxime Coquelin,
	Alexandre Torgue, David S. Miller, Peter Korsgaard, Timur Tabi,
	Michal Simek

On Tue, Sep 14, 2021 at 11:14:07AM +0200, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> ---
>  drivers/tty/serial/21285.c                  |  2 +-
>  drivers/tty/serial/amba-pl010.c             |  2 +-
>  drivers/tty/serial/amba-pl011.c             |  6 +++---
>  drivers/tty/serial/clps711x.c               |  2 +-
>  drivers/tty/serial/sa1100.c                 |  2 +-
>  drivers/tty/serial/serial_core.c            |  2 +-

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push
  2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
                     ` (17 preceding siblings ...)
  2021-09-16 12:54   ` Russell King (Oracle)
@ 2021-09-16 20:30   ` Vladimir Zapolskiy
  18 siblings, 0 replies; 49+ messages in thread
From: Vladimir Zapolskiy @ 2021-09-16 20:30 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: linux-serial, linux-kernel, gregkh, Joel Stanley, Andrew Jeffery,
	Al Cooper, Matthias Brugger, Tobias Klauser, Russell King,
	Vineet Gupta, Richard Genoud, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Florian Fainelli, bcm-kernel-feedback-list,
	Alexander Shiyan, Baruch Siach, Maciej W. Rozycki, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Karol Gugala, Mateusz Holenko, Neil Armstrong,
	Kevin Hilman, Jerome Brunet, Martin Blumenstingl, Liviu Dudau,
	Sudeep Holla, Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
	Andreas Färber, Manivannan Sadhasivam, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras, Kevin Cernekee,
	Krzysztof Kozlowski, Laxman Dewangan, Thierry Reding,
	Jonathan Hunter, Palmer Dabbelt, Paul Walmsley, Orson Zhai,
	Baolin Wang, Chunyan Zhang, Patrice Chotard, Maxime Coquelin,
	Alexandre Torgue, David S. Miller, Peter Korsgaard, Timur Tabi,
	Michal Simek

Hi Jiri,

On 9/14/21 12:14 PM, Jiri Slaby wrote:
> Since commit a9c3f68f3cd8d (tty: Fix low_latency BUG) in 2014,
> tty_flip_buffer_push() is only a wrapper to tty_schedule_flip(). We are
> going to remove the former, so call the latter directly in
> drivers/tty/serial/.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>

for LPC32xx HS UART:

>   drivers/tty/serial/lpc32xx_hs.c             |  2 +-

Acked-by: Vladimir Zapolskiy <vz@mleia.com>

--
Best wishes,
Vladimir

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void
  2021-09-14  9:11 ` [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void Jiri Slaby
  2021-09-15  8:05   ` Marc Kleine-Budde
  2021-09-15 11:48   ` Mark Brown
@ 2021-09-21  3:59   ` Dmitry Torokhov
  2 siblings, 0 replies; 49+ messages in thread
From: Dmitry Torokhov @ 2021-09-21  3:59 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, linux-serial, linux-kernel, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Paul Mackerras, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Peter Ujfalusi

On Tue, Sep 14, 2021 at 11:11:22AM +0200, Jiri Slaby wrote:
> The documentation says that the return value of tty_ldisc_ops::hangup
> hook is ignored. And it really is, so there is no point for its return
> type to be int. Switch it to void and all the hooks too.
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Wolfgang Grandegger <wg@grandegger.com>
> Cc: Marc Kleine-Budde <mkl@pengutronix.de>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com>
> ---
>  Documentation/driver-api/serial/tty.rst | 2 +-
>  drivers/input/serio/serport.c           | 3 +--

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl
  2021-09-14  9:11 ` [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl Jiri Slaby
  2021-09-14  9:16   ` Krzysztof Kozlowski
  2021-09-15  8:02   ` Marc Kleine-Budde
@ 2021-09-21  4:00   ` Dmitry Torokhov
  2021-09-21 10:52     ` Jiri Slaby
  2 siblings, 1 reply; 49+ messages in thread
From: Dmitry Torokhov @ 2021-09-21  4:00 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: gregkh, linux-serial, linux-kernel, Marcel Holtmann,
	Johan Hedberg, Luiz Augusto von Dentz, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Andreas Koensgen, Paul Mackerras, Krzysztof Kozlowski

Hi Jiri,

On Tue, Sep 14, 2021 at 11:11:25AM +0200, Jiri Slaby wrote:
> diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
> index 17eb8f2aa48d..55e91d0e70ec 100644
> --- a/drivers/input/serio/serport.c
> +++ b/drivers/input/serio/serport.c
> @@ -207,8 +207,8 @@ static void serport_set_type(struct tty_struct *tty, unsigned long type)
>   * serport_ldisc_ioctl() allows to set the port protocol, and device ID
>   */
>  
> -static int serport_ldisc_ioctl(struct tty_struct *tty, struct file *file,
> -			       unsigned int cmd, unsigned long arg)
> +static int serport_ldisc_ioctl(struct tty_struct *tty, unsigned int cmd,
> +		unsigned long arg)

Can we please keep arguments aligned as they were? Otherwise

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl
  2021-09-21  4:00   ` Dmitry Torokhov
@ 2021-09-21 10:52     ` Jiri Slaby
  2021-09-21 11:36       ` Greg KH
  0 siblings, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-09-21 10:52 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: gregkh, linux-serial, linux-kernel, Marcel Holtmann,
	Johan Hedberg, Luiz Augusto von Dentz, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Andreas Koensgen, Paul Mackerras, Krzysztof Kozlowski

On 21. 09. 21, 6:00, Dmitry Torokhov wrote:
> Hi Jiri,
> 
> On Tue, Sep 14, 2021 at 11:11:25AM +0200, Jiri Slaby wrote:
>> diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
>> index 17eb8f2aa48d..55e91d0e70ec 100644
>> --- a/drivers/input/serio/serport.c
>> +++ b/drivers/input/serio/serport.c
>> @@ -207,8 +207,8 @@ static void serport_set_type(struct tty_struct *tty, unsigned long type)
>>    * serport_ldisc_ioctl() allows to set the port protocol, and device ID
>>    */
>>   
>> -static int serport_ldisc_ioctl(struct tty_struct *tty, struct file *file,
>> -			       unsigned int cmd, unsigned long arg)
>> +static int serport_ldisc_ioctl(struct tty_struct *tty, unsigned int cmd,
>> +		unsigned long arg)
> 
> Can we please keep arguments aligned as they were? Otherwise

Fixed, thanks. Likely, I will send a follow-up -- depending if Greg 
drops or keeps these in the tree.

-- 
js
suse labs

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl
  2021-09-21 10:52     ` Jiri Slaby
@ 2021-09-21 11:36       ` Greg KH
  2021-09-21 15:51         ` Jiri Slaby
  0 siblings, 1 reply; 49+ messages in thread
From: Greg KH @ 2021-09-21 11:36 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Dmitry Torokhov, linux-serial, linux-kernel, Marcel Holtmann,
	Johan Hedberg, Luiz Augusto von Dentz, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Andreas Koensgen, Paul Mackerras, Krzysztof Kozlowski

On Tue, Sep 21, 2021 at 12:52:38PM +0200, Jiri Slaby wrote:
> On 21. 09. 21, 6:00, Dmitry Torokhov wrote:
> > Hi Jiri,
> > 
> > On Tue, Sep 14, 2021 at 11:11:25AM +0200, Jiri Slaby wrote:
> > > diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
> > > index 17eb8f2aa48d..55e91d0e70ec 100644
> > > --- a/drivers/input/serio/serport.c
> > > +++ b/drivers/input/serio/serport.c
> > > @@ -207,8 +207,8 @@ static void serport_set_type(struct tty_struct *tty, unsigned long type)
> > >    * serport_ldisc_ioctl() allows to set the port protocol, and device ID
> > >    */
> > > -static int serport_ldisc_ioctl(struct tty_struct *tty, struct file *file,
> > > -			       unsigned int cmd, unsigned long arg)
> > > +static int serport_ldisc_ioctl(struct tty_struct *tty, unsigned int cmd,
> > > +		unsigned long arg)
> > 
> > Can we please keep arguments aligned as they were? Otherwise
> 
> Fixed, thanks. Likely, I will send a follow-up -- depending if Greg drops or
> keeps these in the tree.

Up to you.  I can drop them all now if you want to resend a v2 with all
of the aggregate acks, or you can send a follow-up set on top of these.

Your choice.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl
  2021-09-21 11:36       ` Greg KH
@ 2021-09-21 15:51         ` Jiri Slaby
  2021-09-22 15:01           ` Greg KH
  0 siblings, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-09-21 15:51 UTC (permalink / raw)
  To: Greg KH
  Cc: Dmitry Torokhov, linux-serial, linux-kernel, Marcel Holtmann,
	Johan Hedberg, Luiz Augusto von Dentz, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Andreas Koensgen, Paul Mackerras, Krzysztof Kozlowski

On 21. 09. 21, 13:36, Greg KH wrote:
> On Tue, Sep 21, 2021 at 12:52:38PM +0200, Jiri Slaby wrote:
>> On 21. 09. 21, 6:00, Dmitry Torokhov wrote:
>>> Hi Jiri,
>>>
>>> On Tue, Sep 14, 2021 at 11:11:25AM +0200, Jiri Slaby wrote:
>>>> diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
>>>> index 17eb8f2aa48d..55e91d0e70ec 100644
>>>> --- a/drivers/input/serio/serport.c
>>>> +++ b/drivers/input/serio/serport.c
>>>> @@ -207,8 +207,8 @@ static void serport_set_type(struct tty_struct *tty, unsigned long type)
>>>>     * serport_ldisc_ioctl() allows to set the port protocol, and device ID
>>>>     */
>>>> -static int serport_ldisc_ioctl(struct tty_struct *tty, struct file *file,
>>>> -			       unsigned int cmd, unsigned long arg)
>>>> +static int serport_ldisc_ioctl(struct tty_struct *tty, unsigned int cmd,
>>>> +		unsigned long arg)
>>>
>>> Can we please keep arguments aligned as they were? Otherwise
>>
>> Fixed, thanks. Likely, I will send a follow-up -- depending if Greg drops or
>> keeps these in the tree.
> 
> Up to you.  I can drop them all now if you want to resend a v2 with all
> of the aggregate acks, or you can send a follow-up set on top of these.

What about if you keep everything up to (and incl.)
   tty: remove file from n_tty_ioctl_helper
(i.e. the patch 06/16, the one before this one)? If that works for you, 
I will send v2 of the rest w/ collected acks. If it doesn't, I prefer 
sending a complete v2 (incl. collected acks).

thanks,
-- 
js

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 16/16] tty: drop tty_flip_buffer_push
  2021-09-16 10:03     ` Johan Hovold
@ 2021-09-22  6:57       ` Jiri Slaby
  2021-09-23  8:32         ` Johan Hovold
  2021-11-18  7:54         ` Jiri Slaby
  0 siblings, 2 replies; 49+ messages in thread
From: Jiri Slaby @ 2021-09-22  6:57 UTC (permalink / raw)
  To: Johan Hovold; +Cc: gregkh, linux-serial, linux-kernel

On 16. 09. 21, 12:03, Johan Hovold wrote:
> On Tue, Sep 14, 2021 at 11:14:15AM +0200, Jiri Slaby wrote:
>> 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, so remove tty_flip_buffer_push() completely.
> 
> Did you consider inlining tty_flip_buffer_push() or unexporting
> tty_schedule_flip() instead?

Yes -- I see no reason for two functions doing the very same thing. It's 
only confusing.

> The name tty_flip_buffer_push() is arguable more descriptive since the
> work may already be running and is also less tied to the implementation.
> 
> The ratio of drivers using tty_flip_buffer_push() over
> tty_schedule_flip() is also something like 186 to 15 so that would
> amount to a lot less churn too.

OK, I can do either way. I chose this path as tty_schedule_flip was a 
wrapper to tty_flip_buffer_push. In any case, I wouldn't take the number 
of changed drivers as a measure. But if it makes more sense for people 
regarding the naming, I will "flip" the two flips.

> Also, can you please start adding cover letters to your series to
> provide an overview of what it is you're trying to accomplish?

I am not a fan of cover letters as they are not Cced to people who are 
Cced in separate patches. So what would you like to see in the letter? 
This series are just a random cleanup and IMO there is not much more to 
be said except what is in their commit logs.

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl
  2021-09-21 15:51         ` Jiri Slaby
@ 2021-09-22 15:01           ` Greg KH
  0 siblings, 0 replies; 49+ messages in thread
From: Greg KH @ 2021-09-22 15:01 UTC (permalink / raw)
  To: Jiri Slaby
  Cc: Dmitry Torokhov, linux-serial, linux-kernel, Marcel Holtmann,
	Johan Hedberg, Luiz Augusto von Dentz, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Andreas Koensgen, Paul Mackerras, Krzysztof Kozlowski

On Tue, Sep 21, 2021 at 05:51:35PM +0200, Jiri Slaby wrote:
> On 21. 09. 21, 13:36, Greg KH wrote:
> > On Tue, Sep 21, 2021 at 12:52:38PM +0200, Jiri Slaby wrote:
> > > On 21. 09. 21, 6:00, Dmitry Torokhov wrote:
> > > > Hi Jiri,
> > > > 
> > > > On Tue, Sep 14, 2021 at 11:11:25AM +0200, Jiri Slaby wrote:
> > > > > diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
> > > > > index 17eb8f2aa48d..55e91d0e70ec 100644
> > > > > --- a/drivers/input/serio/serport.c
> > > > > +++ b/drivers/input/serio/serport.c
> > > > > @@ -207,8 +207,8 @@ static void serport_set_type(struct tty_struct *tty, unsigned long type)
> > > > >     * serport_ldisc_ioctl() allows to set the port protocol, and device ID
> > > > >     */
> > > > > -static int serport_ldisc_ioctl(struct tty_struct *tty, struct file *file,
> > > > > -			       unsigned int cmd, unsigned long arg)
> > > > > +static int serport_ldisc_ioctl(struct tty_struct *tty, unsigned int cmd,
> > > > > +		unsigned long arg)
> > > > 
> > > > Can we please keep arguments aligned as they were? Otherwise
> > > 
> > > Fixed, thanks. Likely, I will send a follow-up -- depending if Greg drops or
> > > keeps these in the tree.
> > 
> > Up to you.  I can drop them all now if you want to resend a v2 with all
> > of the aggregate acks, or you can send a follow-up set on top of these.
> 
> What about if you keep everything up to (and incl.)
>   tty: remove file from n_tty_ioctl_helper
> (i.e. the patch 06/16, the one before this one)? If that works for you, I
> will send v2 of the rest w/ collected acks. If it doesn't, I prefer sending
> a complete v2 (incl. collected acks).

Ok, I have kept everything up to and including patch 06 of this series
and pushed that out now.

Feel free to rebase on my tty-next branch and resend the remaining
changes.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 16/16] tty: drop tty_flip_buffer_push
  2021-09-22  6:57       ` Jiri Slaby
@ 2021-09-23  8:32         ` Johan Hovold
  2021-11-18  7:54         ` Jiri Slaby
  1 sibling, 0 replies; 49+ messages in thread
From: Johan Hovold @ 2021-09-23  8:32 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: gregkh, linux-serial, linux-kernel

On Wed, Sep 22, 2021 at 08:57:17AM +0200, Jiri Slaby wrote:
> On 16. 09. 21, 12:03, Johan Hovold wrote:
> > On Tue, Sep 14, 2021 at 11:14:15AM +0200, Jiri Slaby wrote:
> >> 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, so remove tty_flip_buffer_push() completely.

> > The name tty_flip_buffer_push() is arguable more descriptive since the
> > work may already be running and is also less tied to the implementation.
> > 
> > The ratio of drivers using tty_flip_buffer_push() over
> > tty_schedule_flip() is also something like 186 to 15 so that would
> > amount to a lot less churn too.
> 
> OK, I can do either way. I chose this path as tty_schedule_flip was a 
> wrapper to tty_flip_buffer_push. In any case, I wouldn't take the number 
> of changed drivers as a measure. But if it makes more sense for people 
> regarding the naming, I will "flip" the two flips.

I'd prefer that. The name tty_flip_buffer_push() is more descriptive and
we've been using it in virtually all tty drivers since 1997. No need to
force people to relearn the pattern of tty insert + push.

(Also note that the kernel doc for tty_schedule_flip() says "push
characters to ldisc", while the name more reflects how the tty buffering
was originally implemented.)
 
> > Also, can you please start adding cover letters to your series to
> > provide an overview of what it is you're trying to accomplish?
> 
> I am not a fan of cover letters as they are not Cced to people who are 
> Cced in separate patches. So what would you like to see in the letter? 
> This series are just a random cleanup and IMO there is not much more to 
> be said except what is in their commit logs.

Even if all it said was "random cleanups" it would still be worth having
as I'd know that this is just Jiri moving code about and not necessarily
something that needs deeper review.

In this case the driver commit messages only said that "[w]e are going
to remove [tty_flip_buffer_push()]" without any real explanation why
that was chosen over the alternatives. I had to look up the series on
lore to look for more details. But since there's no cover letter I end
up having to skim the entire series only to come up mostly empty handed
as the final patch just added "One less exported function" as some sort
of motivation.

Let's not make it harder for reviewers. If you're sending random cleanup
patches then say so. And if they can be grouped into a few classes as
seemed to be the case here then having those outlined is also helpful.

Johan

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 16/16] tty: drop tty_flip_buffer_push
  2021-09-22  6:57       ` Jiri Slaby
  2021-09-23  8:32         ` Johan Hovold
@ 2021-11-18  7:54         ` Jiri Slaby
  2021-11-18  8:10           ` Johan Hovold
  1 sibling, 1 reply; 49+ messages in thread
From: Jiri Slaby @ 2021-11-18  7:54 UTC (permalink / raw)
  To: Johan Hovold, gregkh; +Cc: linux-serial, linux-kernel

Friendly ping Johan, Greg: any opinions on the tty_schedule_flip vs 
tty_flip_buffer_push case -- which one should I keep?

I would like to move forward with these as I have a lot kernel-doc 
writings pending and depending on this patch (be it "drop 
tty_flip_buffer_push" or "drop tty_schedule_flip").

Thanks.

On 22. 09. 21, 8:57, Jiri Slaby wrote:
> On 16. 09. 21, 12:03, Johan Hovold wrote:
>> On Tue, Sep 14, 2021 at 11:14:15AM +0200, Jiri Slaby wrote:
>>> 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, so remove tty_flip_buffer_push() completely.
>>
>> Did you consider inlining tty_flip_buffer_push() or unexporting
>> tty_schedule_flip() instead?
> 
> Yes -- I see no reason for two functions doing the very same thing. It's 
> only confusing.
> 
>> The name tty_flip_buffer_push() is arguable more descriptive since the
>> work may already be running and is also less tied to the implementation.
>>
>> The ratio of drivers using tty_flip_buffer_push() over
>> tty_schedule_flip() is also something like 186 to 15 so that would
>> amount to a lot less churn too.
> 
> OK, I can do either way. I chose this path as tty_schedule_flip was a 
> wrapper to tty_flip_buffer_push. In any case, I wouldn't take the number 
> of changed drivers as a measure. But if it makes more sense for people 
> regarding the naming, I will "flip" the two flips.



-- 
js
suse labs

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: [PATCH 16/16] tty: drop tty_flip_buffer_push
  2021-11-18  7:54         ` Jiri Slaby
@ 2021-11-18  8:10           ` Johan Hovold
  0 siblings, 0 replies; 49+ messages in thread
From: Johan Hovold @ 2021-11-18  8:10 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: gregkh, linux-serial, linux-kernel

On Thu, Nov 18, 2021 at 08:54:05AM +0100, Jiri Slaby wrote:
> Friendly ping Johan, Greg: any opinions on the tty_schedule_flip vs 
> tty_flip_buffer_push case -- which one should I keep?

I still prefer keeping tty_flip_buffer_push() since it's name is much
more descriptive and since it's used by almost all drivers.

There's also no good reason to force developers to relearn the insert +
push pattern either (and rewriting the documentation and books that
describe it).

Johan
 
> On 22. 09. 21, 8:57, Jiri Slaby wrote:
> > On 16. 09. 21, 12:03, Johan Hovold wrote:
> >> On Tue, Sep 14, 2021 at 11:14:15AM +0200, Jiri Slaby wrote:
> >>> 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, so remove tty_flip_buffer_push() completely.
> >>
> >> Did you consider inlining tty_flip_buffer_push() or unexporting
> >> tty_schedule_flip() instead?
> > 
> > Yes -- I see no reason for two functions doing the very same thing. It's 
> > only confusing.
> > 
> >> The name tty_flip_buffer_push() is arguable more descriptive since the
> >> work may already be running and is also less tied to the implementation.
> >>
> >> The ratio of drivers using tty_flip_buffer_push() over
> >> tty_schedule_flip() is also something like 186 to 15 so that would
> >> amount to a lot less churn too.
> > 
> > OK, I can do either way. I chose this path as tty_schedule_flip was a 
> > wrapper to tty_flip_buffer_push. In any case, I wouldn't take the number 
> > of changed drivers as a measure. But if it makes more sense for people 
> > regarding the naming, I will "flip" the two flips.

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2021-11-18  8:11 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14  9:11 [PATCH 01/16] tty: unexport tty_ldisc_release Jiri Slaby
2021-09-14  9:11 ` [PATCH 02/16] tty: remove flags from struct tty_ldisc_ops Jiri Slaby
2021-09-14  9:11 ` [PATCH 03/16] tty: remove extern from functions in tty headers Jiri Slaby
2021-09-14  9:11 ` [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void Jiri Slaby
2021-09-15  8:05   ` Marc Kleine-Budde
2021-09-15 11:48   ` Mark Brown
2021-09-21  3:59   ` Dmitry Torokhov
2021-09-14  9:11 ` [PATCH 05/16] tty: remove file from tty_mode_ioctl Jiri Slaby
2021-09-15  8:05   ` Marc Kleine-Budde
2021-09-14  9:11 ` [PATCH 06/16] tty: remove file from n_tty_ioctl_helper Jiri Slaby
2021-09-14  9:15   ` Krzysztof Kozlowski
2021-09-14  9:11 ` [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl Jiri Slaby
2021-09-14  9:16   ` Krzysztof Kozlowski
2021-09-15  8:02   ` Marc Kleine-Budde
2021-09-21  4:00   ` Dmitry Torokhov
2021-09-21 10:52     ` Jiri Slaby
2021-09-21 11:36       ` Greg KH
2021-09-21 15:51         ` Jiri Slaby
2021-09-22 15:01           ` Greg KH
2021-09-14  9:14 ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Jiri Slaby
2021-09-14  9:14   ` [PATCH 09/16] tty: drivers/tty/, " Jiri Slaby
2021-09-14 16:06     ` David Sterba
2021-09-14  9:14   ` [PATCH 10/16] tty: drivers/usb/serial/, " Jiri Slaby
2021-09-14  9:14   ` [PATCH 11/16] tty: drivers/usb/, " Jiri Slaby
2021-09-14  9:14   ` [PATCH 12/16] tty: arch/, " Jiri Slaby
2021-09-15  8:10     ` Max Filippov
2021-09-15  8:10       ` Max Filippov
2021-09-14  9:14   ` [PATCH 13/16] tty: drivers/s390/char/, " Jiri Slaby
2021-09-14  9:14   ` [PATCH 14/16] tty: drivers/staging/, " Jiri Slaby
2021-09-14 13:19     ` [greybus-dev] " Alex Elder
2021-09-14  9:14   ` [PATCH 15/16] tty: the rest, " Jiri Slaby
2021-09-14 11:58     ` Samuel Iglesias Gonsálvez
2021-09-14  9:14   ` [PATCH 16/16] tty: drop tty_flip_buffer_push Jiri Slaby
2021-09-16 10:03     ` Johan Hovold
2021-09-22  6:57       ` Jiri Slaby
2021-09-23  8:32         ` Johan Hovold
2021-11-18  7:54         ` Jiri Slaby
2021-11-18  8:10           ` Johan Hovold
2021-09-14  9:17   ` [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Krzysztof Kozlowski
2021-09-14 12:54   ` Uwe Kleine-König
2021-09-14 13:53   ` Richard Genoud
2021-09-15 17:00   ` Tobias Klauser
2021-09-15 17:53   ` Andreas Färber
2021-09-15 23:43   ` Andrew Jeffery
2021-09-16  7:13   ` Nicolas Ferre
2021-09-16  7:32   ` Chunyan Zhang
2021-09-16  7:48   ` Neil Armstrong
2021-09-16 12:54   ` Russell King (Oracle)
2021-09-16 20:30   ` Vladimir Zapolskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.