From patchwork Tue Sep 14 09:11:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 512715 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAB8CC433F5 for ; Tue, 14 Sep 2021 09:11:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC5A061029 for ; Tue, 14 Sep 2021 09:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbhINJMx (ORCPT ); Tue, 14 Sep 2021 05:12:53 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:43296 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbhINJMx (ORCPT ); Tue, 14 Sep 2021 05:12:53 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 40B1B1FDD3; Tue, 14 Sep 2021 09:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610695; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TqZ09VJe+QSg5tvEq+VkQHIZakC2U6+P8iDY466ODMQ=; b=w6rDB04qr9omE5UtpF+ENmhJGNdZaysMzGzSl9rIvAzMUmrEgTYpvyAxNZHzS2o4kBHnGj 5lxdKqMvDU3OemBKdcfOQ3pvxcLzjWwIoAcJeTZyl3ZkQxcQnntElQiEImkEgKcyGy4M66 kPOHZ+UDWKep3vekQpNlwjeiP+jtGBE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610695; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TqZ09VJe+QSg5tvEq+VkQHIZakC2U6+P8iDY466ODMQ=; b=ROUcSZ1ooYa047BKtuJ2EczX49Iuq3VJvXkGKSU78l5K2n8/Yd+VRPuDxLIt3XHFa0WXl0 T0khzOHxosd5BdCA== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 233A5A3B98; Tue, 14 Sep 2021 09:11:35 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 01/16] tty: unexport tty_ldisc_release Date: Tue, 14 Sep 2021 11:11:19 +0200 Message-Id: <20210914091134.17426-1-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 --- 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 From patchwork Tue Sep 14 09:11:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 511402 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EA5EC433EF for ; Tue, 14 Sep 2021 09:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05EEB60295 for ; Tue, 14 Sep 2021 09:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229786AbhINJMy (ORCPT ); Tue, 14 Sep 2021 05:12:54 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:43304 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbhINJMx (ORCPT ); Tue, 14 Sep 2021 05:12:53 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 627811FDD8; Tue, 14 Sep 2021 09:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610695; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Afy0W5Ch0lQc/0H0xlqzCO70rTwo6T7/zH/NeO0NZWg=; b=2cNPdCLAtMVIAkKoq0FDgNFwn4ZmVm1gWTGTRs+XObz68PyTXIiqa7jExCtfLRe+8mes9F BhDKlHxT0e0iMMcuvLepHcrIHOgb6dK3aBdjVWndB58eB47hdV2Z1vzSuJzYrFFcrqqoeu ekP3H96ovbeHBsZ8o5KRylb98dm/hSw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610695; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Afy0W5Ch0lQc/0H0xlqzCO70rTwo6T7/zH/NeO0NZWg=; b=6Kk8lUvZjStigNV41t9A2eHz9fqTrTGEbBWNj6T4EvFXDg2khEPIgjrps7WZFo26THs+P+ U3ovA/jZEYAoK+Bg== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 4667DA3B8E; Tue, 14 Sep 2021 09:11:35 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 02/16] tty: remove flags from struct tty_ldisc_ops Date: Tue, 14 Sep 2021 11:11:20 +0200 Message-Id: <20210914091134.17426-2-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091134.17426-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 --- 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)) From patchwork Tue Sep 14 09:11:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 512714 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED0ACC4332F for ; Tue, 14 Sep 2021 09:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5E7F61108 for ; Tue, 14 Sep 2021 09:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbhINJMy (ORCPT ); Tue, 14 Sep 2021 05:12:54 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:33652 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbhINJMx (ORCPT ); Tue, 14 Sep 2021 05:12:53 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 8C4BA21FAE; Tue, 14 Sep 2021 09:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610695; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cxDKGykKAu1PDTACMZpSs/9WeRFvhFKCZXYiul1wwKI=; b=GcY4IfKs+7FwieeslfgpMGnvVSPmqFYcSGxzLoiNvwg1tT7oNVXHXgAsddd3UkDQQK+7Qy N1dScIGYa+m+Ws4yIN9yVewGEqbz+96x17jjUNBS1l0nmX0U+ThcLHEXuowizCdnS2qTCa N6Rx5RS8O1mM2znxM4onuN9wkw3k+aI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610695; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cxDKGykKAu1PDTACMZpSs/9WeRFvhFKCZXYiul1wwKI=; b=3z4N+Tp6LyDYyi0HAzSFmVGbSHVp9ANIdERVasCjBYG3irVm+AtdKix4OxzbRaV+jpa5dn pfKGjiWbe/OeySDw== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 6A354A3B9C; Tue, 14 Sep 2021 09:11:35 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 03/16] tty: remove extern from functions in tty headers Date: Tue, 14 Sep 2021 11:11:21 +0200 Message-Id: <20210914091134.17426-3-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091134.17426-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 --- 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) From patchwork Tue Sep 14 09:11:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 511401 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1321AC433EF for ; Tue, 14 Sep 2021 09:11:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F106F60295 for ; Tue, 14 Sep 2021 09:11:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229897AbhINJMz (ORCPT ); Tue, 14 Sep 2021 05:12:55 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:33660 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbhINJMy (ORCPT ); Tue, 14 Sep 2021 05:12:54 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 26DEF220CA; Tue, 14 Sep 2021 09:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ijYycuxNzb4CZxioNn34Cm6B6LnK5yofNrdSgJwB/6U=; b=Q7S7WgrN/z+32+esom0vO4HjTORkKuxO1Ry0bZptLymWbsLzbayy1L5qoJT5sor57R79nx sXzU/XLo3b/1niib4dLAqE4MPdEBTARKs4Cct/dLLIxSjs568+F9zplvu6+vogV3DEep6i pgiEZ59l0+QMVgLvjhCRtzPf59tDDL0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ijYycuxNzb4CZxioNn34Cm6B6LnK5yofNrdSgJwB/6U=; b=E/aAU2iefykGLPkl3sdhMxoX0F2gqmyVsKK57rMU52jfCJsDiUN1NbWTMV1Ss4GPM+Ktaj CuA3POTYNLCdvpBQ== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 91BE2A3B98; Tue, 14 Sep 2021 09:11:35 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Subject: [PATCH 04/16] tty: make tty_ldisc_ops::hangup return void Date: Tue, 14 Sep 2021 11:11:22 +0200 Message-Id: <20210914091134.17426-4-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091134.17426-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Dmitry Torokhov Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Paul Mackerras Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Peter Ujfalusi Acked-by: Marc Kleine-Budde Acked-by: Mark Brown Acked-by: Dmitry Torokhov --- 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() */ From patchwork Tue Sep 14 09:11:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 512713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BACCBC433EF for ; Tue, 14 Sep 2021 09:11:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A486E60295 for ; Tue, 14 Sep 2021 09:11:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230071AbhINJM6 (ORCPT ); Tue, 14 Sep 2021 05:12:58 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:43314 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbhINJMy (ORCPT ); Tue, 14 Sep 2021 05:12:54 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 6F338200E0; Tue, 14 Sep 2021 09:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w+eDAVcK/wYcv9BVgAvQDXyn91WVx/j7lKfny9JvPug=; b=JrZo4Du8EpRuoMd+9AKewDxaR8EzF/HT8EN4Kwtxiy07n7924gDq2V8hR3tEoJXcaBtZtO fC8t4G5+LFRqS0++mscKmqzupBgvFXhFpwhuxpUEvXlmfT1PXlm+ZnBbUc0Rx76cIMsjQX x6Xqiq4T99uL7Gjm3YT+jm0LSjpLa64= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w+eDAVcK/wYcv9BVgAvQDXyn91WVx/j7lKfny9JvPug=; b=VLMBcG0NjAUronUzkB9uGW0pmX8w0CwJKiPvHqLEjBGDGxolOSJ76P/Hc33to6KzHDfnwf mnp20bkCR9S1YUBw== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 2BBDAA3B8E; Tue, 14 Sep 2021 09:11:36 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Jakub Kicinski , Andreas Koensgen , Paul Mackerras Subject: [PATCH 05/16] tty: remove file from tty_mode_ioctl Date: Tue, 14 Sep 2021 11:11:23 +0200 Message-Id: <20210914091134.17426-5-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091134.17426-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Andreas Koensgen Cc: Paul Mackerras --- 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); From patchwork Tue Sep 14 09:11:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 511400 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AF07C433FE for ; Tue, 14 Sep 2021 09:11:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84F3360F21 for ; Tue, 14 Sep 2021 09:11:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230154AbhINJNA (ORCPT ); Tue, 14 Sep 2021 05:13:00 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:43336 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbhINJMy (ORCPT ); Tue, 14 Sep 2021 05:12:54 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id B8EC91FDD3; Tue, 14 Sep 2021 09:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/pJJWMdcxHneXOWb9CMwKHFCECeJ256Rm7qUNuZChoA=; b=vitkAkhU7NRjmWz6RpNunirgH6WE7aSeY5pmwRfEHMCykfRDv8dTplRIXHIl/L5h0/1MKy oqHWMY3oWSj+A0ikF865VFiFUzOUvVshZm2PDRgAzfKu02kDDDldwNGv68fLiHlOrY63JN L2Nkb4ezr+m/yLC4oYx5kAdz9InllyY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610696; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/pJJWMdcxHneXOWb9CMwKHFCECeJ256Rm7qUNuZChoA=; b=W1C8VdYFmzYQQrmpA64gKit1yI5LyodLvRsiSIfqKM7+fbtsKhnRnDHks2SuAn/VImgmfa C/I13MghIRJQ+JDg== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 76BA4A3B90; Tue, 14 Sep 2021 09:11:36 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Paul Mackerras , "David S. Miller" , Jakub Kicinski , Krzysztof Kozlowski Subject: [PATCH 06/16] tty: remove file from n_tty_ioctl_helper Date: Tue, 14 Sep 2021 11:11:24 +0200 Message-Id: <20210914091134.17426-6-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091134.17426-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: Paul Mackerras Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Krzysztof Kozlowski Acked-by: Krzysztof Kozlowski --- 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; } From patchwork Tue Sep 14 09:11:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 512712 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4652C4332F for ; Tue, 14 Sep 2021 09:11:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC79260E97 for ; Tue, 14 Sep 2021 09:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230330AbhINJND (ORCPT ); Tue, 14 Sep 2021 05:13:03 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:33692 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbhINJMz (ORCPT ); Tue, 14 Sep 2021 05:12:55 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 2AA21220CC; Tue, 14 Sep 2021 09:11:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610697; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AllfHs/C0gAW47kfKHkGhj3X5BkDOeKWstqXtiAdJxM=; b=z+p3PbJnJYH93gGrSWmT8RBR6eMwtQvQAy3Dg+ZGOjSiiPYhfRqdtiC336/llYFCbVkLQD W8HC3gr2H09eEAPVCye8TcbJnLqoLmLgncTDGHGqDIZuQtnNmOw6CmIj3bbOL15E/yKGOw mydZuiEQUGn/SsPfaIbJH/p08+k00Dk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610697; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AllfHs/C0gAW47kfKHkGhj3X5BkDOeKWstqXtiAdJxM=; b=zY9sk9rjCx3HURctUkVf2LnW9t9CISl9aQAayDYBBbB1/JWgln4G5y2RiMulZrF05vZWgM F43CeorWMyEkMCBQ== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C2C48A3B8E; Tue, 14 Sep 2021 09:11:36 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Subject: [PATCH 07/16] tty: remove file from tty_ldisc_ops::ioctl and compat_ioctl Date: Tue, 14 Sep 2021 11:11:25 +0200 Message-Id: <20210914091134.17426-7-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091134.17426-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: Dmitry Torokhov Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Andreas Koensgen Cc: Paul Mackerras Cc: Krzysztof Kozlowski Acked-by: Dmitry Torokhov --- 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; From patchwork Tue Sep 14 09:14:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 511399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07FEFC433F5 for ; Tue, 14 Sep 2021 09:14:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E167260F21 for ; Tue, 14 Sep 2021 09:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229816AbhINJPg (ORCPT ); Tue, 14 Sep 2021 05:15:36 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:34448 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229612AbhINJPf (ORCPT ); Tue, 14 Sep 2021 05:15:35 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 44E19220D0; Tue, 14 Sep 2021 09:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610857; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zFdEy9fYKtaLBQe6L29ZLxJvFnQ+yKgKSkBJTFaDQsQ=; b=1h7uhD+xxVa9pvPt7sa3QV8JjOpqyYrhi4F5CDMFAfeCY1seBVG28HmPOWL4LIRhFgzL4E /bZlY4Xrm3RghaQutti3tRB6UVjUcUTAReZ123/3tHQ7TTDF3frmgaYuYKMz1/Cghn6pQI Tbbj7YqT6nT2tuqQKodJS+jtmBt7JTk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610857; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zFdEy9fYKtaLBQe6L29ZLxJvFnQ+yKgKSkBJTFaDQsQ=; b=m6gDN/RRv8w5Djy57McEXcRSi66jXBY8jzZxoU9Fh9qoxBJ2DLTCzpQ2eD7rxMl6+6BeL8 aIf8bBEmIObNXsDA== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id EE58AA3B90; Tue, 14 Sep 2021 09:14:15 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, 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@broadcom.com, 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 , =?utf-8?q?Andreas_F=C3=A4rber?= , 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 Subject: [PATCH 08/16] tty: drivers/tty/serial/, stop using tty_flip_buffer_push Date: Tue, 14 Sep 2021 11:14:07 +0200 Message-Id: <20210914091415.17918-1-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091134.17426-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Joel Stanley Cc: Andrew Jeffery Cc: Al Cooper Cc: Matthias Brugger Cc: Tobias Klauser Cc: Russell King Cc: Vineet Gupta Cc: Richard Genoud Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: Alexander Shiyan Cc: Baruch Siach Cc: "Maciej W. Rozycki" Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Karol Gugala Cc: Mateusz Holenko Cc: Vladimir Zapolskiy Cc: Neil Armstrong Cc: Kevin Hilman Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Andy Gross Cc: Bjorn Andersson Cc: "Andreas Färber" Cc: Manivannan Sadhasivam Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Kevin Cernekee Cc: Krzysztof Kozlowski Cc: Laxman Dewangan Cc: Thierry Reding Cc: Jonathan Hunter Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Cc: Patrice Chotard Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: "David S. Miller" Cc: Peter Korsgaard Cc: Timur Tabi Cc: Michal Simek Acked-by: Krzysztof Kozlowski Acked-by: Uwe Kleine-König Acked-by: Richard Genoud Acked-by: David Sterba Acked-by: Tobias Klauser Acked-by: Andreas Färber # owl, rda Acked-by: Andrew Jeffery Acked-by: Nicolas Ferre Acked-by: Chunyan Zhang Acked-by: Neil Armstrong Reviewed-by: Russell King (Oracle) Acked-by: Vladimir Zapolskiy --- 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) From patchwork Tue Sep 14 09:14:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 512711 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F622C433FE for ; Tue, 14 Sep 2021 09:14:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 07ABA60F58 for ; Tue, 14 Sep 2021 09:14:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230000AbhINJPg (ORCPT ); Tue, 14 Sep 2021 05:15:36 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:34528 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbhINJPf (ORCPT ); Tue, 14 Sep 2021 05:15:35 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 984F5220D1; Tue, 14 Sep 2021 09:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610857; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cCkWvpYv5VVJ3UHRUdrtSKabTeRWI4CYH9eGul69DPw=; b=wYr26iLwq3CCN1jNcH9/umi3Fm4ThlblNdds+a9xeA3u8GvXXit5rVQXiD4XJmPjQKJtrN X9WEdbUWFx5rn+Ig2DeTqQuvNI6eabAowZMZi6pXd4bOw3BmldzLVHyZHv8bA7SJBYhSjZ nR/xR2wzpSsp/xhrm2xEaU5ZO5MLN68= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610857; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cCkWvpYv5VVJ3UHRUdrtSKabTeRWI4CYH9eGul69DPw=; b=POCzVnMTscraT5PXR4Xdi/5RnY7+Y0adev1a10dHcjCZM77VPlSDaZr74yTf6VjFtU0L/H JBSnGVApOyz7eUDw== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 47B55A3B8E; Tue, 14 Sep 2021 09:14:17 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Laurentiu Tudor , Jiri Kosina , David Sterba , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , "David S. Miller" Subject: [PATCH 09/16] tty: drivers/tty/, stop using tty_flip_buffer_push Date: Tue, 14 Sep 2021 11:14:08 +0200 Message-Id: <20210914091415.17918-2-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091415.17918-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> <20210914091415.17918-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Laurentiu Tudor Cc: Jiri Kosina Cc: David Sterba Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: "David S. Miller" --- 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; } From patchwork Tue Sep 14 09:14:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 512710 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 263D1C4332F for ; Tue, 14 Sep 2021 09:14:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0FD0461056 for ; Tue, 14 Sep 2021 09:14:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230213AbhINJPi (ORCPT ); Tue, 14 Sep 2021 05:15:38 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:34538 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbhINJPg (ORCPT ); Tue, 14 Sep 2021 05:15:36 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id C7F53220D3; Tue, 14 Sep 2021 09:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610857; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lefCdGCBb2IKxvnUXZv+qZIzzpLyiLa7K/Wg3U6dwD8=; b=dVw+kFFImhNTxDqEJFcpkzlSg7U1qVrLX3DCXA0NZ7HZ6YsPR2FOLJ7z3vOoISQ4EuzX5/ zRK5HlY/1e2KZ+eDWz1NyFpTDECx5K8a4/4muz9x6uzx0NaZHtYlhUpLc/4gytNjaHc0YN adJ0hqZ9EvF3gmuywjJ1n1u/9508UA0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610857; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lefCdGCBb2IKxvnUXZv+qZIzzpLyiLa7K/Wg3U6dwD8=; b=FBK3SovZClqB+NzxxFZe7yysA6LJ8fTKxsrICOsH1ggTKgR68Jk8TKIiTxhf8QWNEf2YIm ZPLZX50Lr0OLWWCA== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A1E87A3B96; Tue, 14 Sep 2021 09:14:17 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Johan Hovold , linux-usb@vger.kernel.org Subject: [PATCH 10/16] tty: drivers/usb/serial/, stop using tty_flip_buffer_push Date: Tue, 14 Sep 2021 11:14:09 +0200 Message-Id: <20210914091415.17918-3-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091415.17918-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> <20210914091415.17918-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Johan Hovold 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__); } From patchwork Tue Sep 14 09:14:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 511398 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 987B5C433EF for ; Tue, 14 Sep 2021 09:14:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C12060F58 for ; Tue, 14 Sep 2021 09:14:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229612AbhINJPh (ORCPT ); Tue, 14 Sep 2021 05:15:37 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:44032 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229815AbhINJPg (ORCPT ); Tue, 14 Sep 2021 05:15:36 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 09E5B1FDD8; Tue, 14 Sep 2021 09:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610858; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uKo4iuOq73+bUNtI4yKJlmudRKyHwvKMnK09aennftc=; b=bfPz8iGJxaVHOCjIVpVMwtHnIo4pIR8piSYQLpWZ/igZotO2dIbhJXlLwZFGvRj1365wm4 S6c7yzZW61Z0UBRn+1RbAR2o6RudLIbAwG64WNz9GQ+9a1XirDeQ0EsPbkfhBCZiFymUfh wdUoEnblJqI7BkA6jpZGYCZMDpROXEM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610858; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uKo4iuOq73+bUNtI4yKJlmudRKyHwvKMnK09aennftc=; b=QJvLKmdYUxFLXR8uHnZ0GkTnP+Eq+/VdFsJ7a2B6QrYQkk76XFhPDD8MRwTQocIj+t3qR1 itMljLJuVDgbh5DQ== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id CE9E3A3B98; Tue, 14 Sep 2021 09:14:17 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Oliver Neukum , Felipe Balbi , Mathias Nyman , linux-usb@vger.kernel.org Subject: [PATCH 11/16] tty: drivers/usb/, stop using tty_flip_buffer_push Date: Tue, 14 Sep 2021 11:14:10 +0200 Message-Id: <20210914091415.17918-4-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091415.17918-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> <20210914091415.17918-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Oliver Neukum Cc: Felipe Balbi Cc: Mathias Nyman 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)) { From patchwork Tue Sep 14 09:14:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 511395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBAE7C4321E for ; Tue, 14 Sep 2021 09:14:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA80061159 for ; Tue, 14 Sep 2021 09:14:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231182AbhINJPl (ORCPT ); Tue, 14 Sep 2021 05:15:41 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:34550 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbhINJPg (ORCPT ); Tue, 14 Sep 2021 05:15:36 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id CCD36220D4; Tue, 14 Sep 2021 09:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610858; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=395yGS0ex2VEogWBSAu+RwdEzwssPbbJ8k+scfecEoE=; b=SlwUZn918D+t+/O/s9bdpcv0HtFMw5Jo8MiakKPq5598ISRcR+jMTDBRwQqWzVlBi2ta7e 9mQzdV58bHvrNxLYtTPQ3OnJgThis3VKJU+xtW1v4X6huteBRPR90fT8gzYiOUo2tsk/AA bitz/ZkosGG6Gz06R6oPjvVPnczqW10= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610858; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=395yGS0ex2VEogWBSAu+RwdEzwssPbbJ8k+scfecEoE=; b=EZfV9JNECZa3I9IKkNFmY1Kbt8x5/44vofy57cayI+AguE8164rxgqfBhC6CfUeTvWX9m/ jrWtOfsa3oCGALBg== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 1431CA3B8E; Tue, 14 Sep 2021 09:14:18 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , "James E.J. Bottomley" , Helge Deller , Jeff Dike , Richard Weinberger , Anton Ivanov , Chris Zankel , Max Filippov , linux-parisc@vger.kernel.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org Subject: [PATCH 12/16] tty: arch/, stop using tty_flip_buffer_push Date: Tue, 14 Sep 2021 11:14:11 +0200 Message-Id: <20210914091415.17918-5-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091415.17918-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> <20210914091415.17918-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: Chris Zankel Cc: Max Filippov Cc: linux-parisc@vger.kernel.org Cc: linux-um@lists.infradead.org Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov --- 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); From patchwork Tue Sep 14 09:14:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 511397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B015C4167D for ; Tue, 14 Sep 2021 09:14:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 712D560F58 for ; Tue, 14 Sep 2021 09:14:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230434AbhINJPl (ORCPT ); Tue, 14 Sep 2021 05:15:41 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:44046 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229850AbhINJPh (ORCPT ); Tue, 14 Sep 2021 05:15:37 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 0A8202003B; Tue, 14 Sep 2021 09:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610859; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0inWg5bKmkT0ZZvF/iDW7c5P6F4DFoIeVXk9hb5kLd8=; b=ZEnbIG8xdQNARrC2PEyHBynMMjIBjZGgamhL/F/zc5S8CEuTy1iiVUsD57mz+a5KeNIXZt fJReYaC+WU+uKBQW6Mqaq4VZ8uv86CxF5EiqOu+Qy1kJJ82j/sjyA9RAs8k6JSDUrQjmM1 /pbeaMwHX5sjiPK2NG4+TpRmYVM3G54= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610859; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0inWg5bKmkT0ZZvF/iDW7c5P6F4DFoIeVXk9hb5kLd8=; b=R9SWt/BC7G3w63VdHr8ciAbMDX2CqilpjmsUVzvsKe3rxiCv9iQn3qwjGqsRqheyAW46+V QvG/oABrsLAqxiBA== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id D2477A3B94; Tue, 14 Sep 2021 09:14:18 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org Subject: [PATCH 13/16] tty: drivers/s390/char/, stop using tty_flip_buffer_push Date: Tue, 14 Sep 2021 11:14:12 +0200 Message-Id: <20210914091415.17918-6-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091415.17918-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> <20210914091415.17918-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger 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; } } From patchwork Tue Sep 14 09:14:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 512709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D281C4167E for ; Tue, 14 Sep 2021 09:14:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 60DBF60F58 for ; Tue, 14 Sep 2021 09:14:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231322AbhINJPm (ORCPT ); Tue, 14 Sep 2021 05:15:42 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:44060 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230063AbhINJPh (ORCPT ); Tue, 14 Sep 2021 05:15:37 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 47E81200E2; Tue, 14 Sep 2021 09:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610859; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=txOd2IWUIzDSEFZp5372yeQmEvrfSft2wWeQObhBtmQ=; b=Ji4MUNTGGQyTZ+hFIkdlpNPwXoDGHzXXxeiGQdON33E6pNbzW2NNz4JwLSSygvyeVFt5mD jAYuWzaViaue1ATKk9rn29sxKWgt0g8c1sTzvmvwIqSBh95Jy1HQhWl+rAulc/PdEJKgRJ oLN9rqe/K1wnjGFqZFv+rbRhWZVGiGo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610859; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=txOd2IWUIzDSEFZp5372yeQmEvrfSft2wWeQObhBtmQ=; b=ttzstxSjRCq5UcgkxklHOopri5R6NOZ5g0oejhtNt08CifpekTXQdd46iYbLByipBFi3cy i+UW18w74OUJsiBg== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 161CCA3B8E; Tue, 14 Sep 2021 09:14:19 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , David Lin , Johan Hovold , Alex Elder , linux-staging@lists.linux.dev, greybus-dev@lists.linaro.org Subject: [PATCH 14/16] tty: drivers/staging/, stop using tty_flip_buffer_push Date: Tue, 14 Sep 2021 11:14:13 +0200 Message-Id: <20210914091415.17918-7-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091415.17918-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> <20210914091415.17918-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: David Lin Cc: Johan Hovold Cc: Alex Elder 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; } From patchwork Tue Sep 14 09:14:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 511396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36D87C28B5B for ; Tue, 14 Sep 2021 09:14:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CBF860F58 for ; Tue, 14 Sep 2021 09:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230265AbhINJPn (ORCPT ); Tue, 14 Sep 2021 05:15:43 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:34578 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230175AbhINJPi (ORCPT ); Tue, 14 Sep 2021 05:15:38 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 6F225220D3; Tue, 14 Sep 2021 09:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610860; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LMC4EVcw/uF5QULJdQl6X+7D4+czqBFVcA6/z6KRT6U=; b=k3u9KliMlQ1JEcDJvVDy77s4yVKR33N/MOhZteBtose3V9JGHCU5xKsufTw/GNkxmTvPcq ceA7dHCV8Kc0Q9ps41X27qMDo+SS+cEu3ogV+qTVdoRAdiZr17UO1/0grQWpgxWvbIEeyn TeQqHhmfFsBo3/fjQkyDSKIlN6Gzo3U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610860; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LMC4EVcw/uF5QULJdQl6X+7D4+czqBFVcA6/z6KRT6U=; b=g7ekpIiGMxbDSdboue8huaHEfTONuSAE/MPja2vjTxyK9Qbst7oCMmpJPa/ZqdrGZgIFUn eAgjdQYKKMFrUZBQ== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 4DA9BA3B94; Tue, 14 Sep 2021 09:14:19 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Subject: [PATCH 15/16] tty: the rest, stop using tty_flip_buffer_push Date: Tue, 14 Sep 2021 11:14:14 +0200 Message-Id: <20210914091415.17918-8-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091415.17918-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> <20210914091415.17918-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 Cc: Arnd Bergmann Cc: Samuel Iglesias Gonsalvez Cc: Jens Taprogge Cc: Scott Branden Cc: Ulf Hansson Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz --- 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 From patchwork Tue Sep 14 09:14:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 512708 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73743C433F5 for ; Tue, 14 Sep 2021 09:14:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B57661155 for ; Tue, 14 Sep 2021 09:14:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231381AbhINJPn (ORCPT ); Tue, 14 Sep 2021 05:15:43 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:34600 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230208AbhINJPi (ORCPT ); Tue, 14 Sep 2021 05:15:38 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 90616220D5; Tue, 14 Sep 2021 09:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631610860; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ptWzO8anEDZUJbbMX+rmrDqkj4g7V1LAPYQTnvJTFXg=; b=VxAY61NZ/P6DOUa6H3xqGUUv578TxOdU6CuArvd+ibeyzofdUaNtb0pyvRPjOomZGIGigT 6AlfkON4urLAhMkMy3UpqirnpubXkYA6s9n9JYyJR/8p3IzBfvRAcW2DuWcl/6ZVXOPR2H QfE+ucrgDaqiwUgURcw7ttn3GwqYwLQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631610860; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ptWzO8anEDZUJbbMX+rmrDqkj4g7V1LAPYQTnvJTFXg=; b=g1nTVx8iBsjCS2nrbWqPE3UpsXMNJjK0zM1J7NgKQsgQxrNlEufvPp9hkPibYpKIjTpGg2 XJQVUK8LpQ4ZU+BQ== Received: from localhost.localdomain (unknown [10.100.201.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 74E02A3B9E; Tue, 14 Sep 2021 09:14:20 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 16/16] tty: drop tty_flip_buffer_push Date: Tue, 14 Sep 2021 11:14:15 +0200 Message-Id: <20210914091415.17918-9-jslaby@suse.cz> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210914091415.17918-1-jslaby@suse.cz> References: <20210914091134.17426-1-jslaby@suse.cz> <20210914091415.17918-1-jslaby@suse.cz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 --- 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);