From nobody Wed Sep 10 10:43:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95C3AC61DA4 for ; Thu, 9 Mar 2023 08:10:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230156AbjCIIKT (ORCPT ); Thu, 9 Mar 2023 03:10:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbjCIIJg (ORCPT ); Thu, 9 Mar 2023 03:09:36 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07E7480922; Thu, 9 Mar 2023 00:09:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678349375; x=1709885375; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RK695QH/y82SbaTTSnPKZdcNJwX827c00O+m1L7g7qE=; b=S7iMbP/eCPROpH3jQZPd2/55QhgpBmv749/IHj7tszQuvRnvQa920H9c 0s4Lsp7v+bV9EcUSibBucP4BJvElyzfMfrT3BaqgFFsldNB8fIt8NdB3z RgDS40wAI//M/Uv6gX89F1dTjE8nfmZlW7Jb+lqrjmv99pK5AcYcXVT3H sgN1f4n+U829+20sN7rbCzyffnGS9ePHQhrOyRPIXGiH9sxNGrIMrugjS 90qU3jJ2lCqzdsY430FFKpUmntdBwzFvVCsEMI46fVjjGjUAM2NBcyUvj TN8M1fulrVeXJyvTUZiPdfdhBtOT3P46SzfJqfD/UQPKWkkNRuPgxX3xk A==; X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="333853545" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="333853545" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="746227955" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="746227955" Received: from unknown (HELO ijarvine-MOBL2.mshome.net) ([10.237.66.35]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:34 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 1/8] serial: Use ARRAY_SIZE() with iso7816 reserved array Date: Thu, 9 Mar 2023 10:09:16 +0200 Message-Id: <20230309080923.11778-2-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> References: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of a literal, size the for loop iteration based on the actual array using ARRAY_SIZE(). Signed-off-by: Ilpo J=C3=A4rvinen --- drivers/tty/serial/serial_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_c= ore.c index 2bd32c8ece39..ee2aabcc8943 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -1491,7 +1492,7 @@ static int uart_set_iso7816_config(struct uart_port *= port, * There are 5 words reserved for future use. Check that userspace * doesn't put stuff in there to prevent breakages in the future. */ - for (i =3D 0; i < 5; i++) + for (i =3D 0; i < ARRAY_SIZE(iso7816.reserved); i++) if (iso7816.reserved[i]) return -EINVAL; =20 --=20 2.30.2 From nobody Wed Sep 10 10:43:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB89FC6FD19 for ; Thu, 9 Mar 2023 08:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229956AbjCIILC (ORCPT ); Thu, 9 Mar 2023 03:11:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230136AbjCIIKL (ORCPT ); Thu, 9 Mar 2023 03:10:11 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0414794A7B; Thu, 9 Mar 2023 00:09:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678349395; x=1709885395; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H5cdTwyQdDsMQRbq0AF2mKviGSSpKyj5Y/PsWAMzXUo=; b=nb+nP12dYJeE9nTkGYeFIUr8iFI0Zhm8SSfiCC8/SWv1joKSRYD2a1Cn xeTCtQ2/Y3gtR/cQPvcAOpIiLR9JtKwLtjQdc2DG7Qkpj5k4iAGS85Lhu LfVqACfsaXnTOYuoVWrYM1lrtFM+eUZrDWBC5+fzVYW4sE80RDnanfu2C sMc/W9gQ46EguIHGMwn2ivwzJBhXOP7C0T7vfeAKtlOIp76+Oe2yMzFJ0 lHEBQTuUJnUx4A4U1U7PJDoXGh0BWrQ2EVES0WULg3Awela3YBgi5ZBGE Mm7AEU1siVZgaKCq87A77YP8BowMylWITUCZXNNKqBCgHMxFYnTBM1TqC A==; X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="333853562" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="333853562" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="746227966" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="746227966" Received: from unknown (HELO ijarvine-MOBL2.mshome.net) ([10.237.66.35]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:36 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 2/8] serial: Use B0 instead of implicit zero assumption Date: Thu, 9 Mar 2023 10:09:17 +0200 Message-Id: <20230309080923.11778-3-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> References: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Compare against B0 rather than assume B0 equals zero, which is true for all archs but explicit B0 makes the code more obvious. Signed-off-by: Ilpo J=C3=A4rvinen --- drivers/tty/serial/serial_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_c= ore.c index ee2aabcc8943..296d2c33ea7a 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1662,10 +1662,10 @@ static void uart_set_termios(struct tty_struct *tty, cflag =3D tty->termios.c_cflag; =20 /* Handle transition to B0 status */ - if ((old_termios->c_cflag & CBAUD) && !(cflag & CBAUD)) + if (((old_termios->c_cflag & CBAUD) !=3D B0) && ((cflag & CBAUD) =3D=3D B= 0)) uart_clear_mctrl(uport, TIOCM_RTS | TIOCM_DTR); /* Handle transition away from B0 status */ - else if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) { + else if (((old_termios->c_cflag & CBAUD) =3D=3D B0) && ((cflag & CBAUD) != =3D B0)) { unsigned int mask =3D TIOCM_DTR; =20 if (!(cflag & CRTSCTS) || !tty_throttled(tty)) --=20 2.30.2 From nobody Wed Sep 10 10:43:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C06AC64EC4 for ; Thu, 9 Mar 2023 08:11:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230249AbjCIILH (ORCPT ); Thu, 9 Mar 2023 03:11:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230256AbjCIIKU (ORCPT ); Thu, 9 Mar 2023 03:10:20 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90F13DABBA; Thu, 9 Mar 2023 00:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678349397; x=1709885397; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XRfgPpxn85tLsP11RZ0ULRKBpwwTVjqUGvOxfTssIbI=; b=RSB1rN1wb/isOzoPegHlumSOcJarT846lTr6zQ8lkDs6Pi50pmbOrLxc 9DiSmOhI0Fruz41DwGnhiylMJ3PNm8J+KCY2cWUUf/jE2CN+DfCpe6Z3V 5KR1fAGgzN154d6kHNlSPX/DHahzTuy/TqyE8FlhALbO8FI+BIO2CfIXt BCx7vLy172GzlCjL2hRUZH/ThofzznTRdq6FAmcPQsOKxHL5U5UkFlWZK G0b5zILRT70FwPTpgsmUFkQnfC5hWaEGjuqrCS+KbF++AWrem4ptlHhzo fWlnfXkKeb5OD4T8r/3mM1xJCySVOUa5dehdPA6s0Q2E5xEOuzzA9xCL8 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="333853575" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="333853575" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="746227972" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="746227972" Received: from unknown (HELO ijarvine-MOBL2.mshome.net) ([10.237.66.35]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:39 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 3/8] serial: Remove extern from func prototypes in headers Date: Thu, 9 Mar 2023 10:09:18 +0200 Message-Id: <20230309080923.11778-4-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> References: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecessary externs from function prototypes in serial_8250.h and serial_core.h. Suggested-by: Jiri Slaby Signed-off-by: Ilpo J=C3=A4rvinen --- include/linux/serial_8250.h | 41 ++++++++++++++++--------------------- include/linux/serial_core.h | 13 ++++++------ 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 19376bee9667..482ce4e66a6b 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h @@ -151,26 +151,22 @@ void serial8250_unregister_port(int line); void serial8250_suspend_port(int line); void serial8250_resume_port(int line); =20 -extern int early_serial_setup(struct uart_port *port); - -extern int early_serial8250_setup(struct earlycon_device *device, - const char *options); -extern void serial8250_update_uartclk(struct uart_port *port, - unsigned int uartclk); -extern void serial8250_do_set_termios(struct uart_port *port, - struct ktermios *termios, const struct ktermios *old); -extern void serial8250_do_set_ldisc(struct uart_port *port, - struct ktermios *termios); -extern unsigned int serial8250_do_get_mctrl(struct uart_port *port); -extern int serial8250_do_startup(struct uart_port *port); -extern void serial8250_do_shutdown(struct uart_port *port); -extern void serial8250_do_pm(struct uart_port *port, unsigned int state, - unsigned int oldstate); -extern void serial8250_do_set_mctrl(struct uart_port *port, unsigned int m= ctrl); -extern void serial8250_do_set_divisor(struct uart_port *port, unsigned int= baud, - unsigned int quot, - unsigned int quot_frac); -extern int fsl8250_handle_irq(struct uart_port *port); +int early_serial_setup(struct uart_port *port); +int early_serial8250_setup(struct earlycon_device *device, const char *opt= ions); + +void serial8250_update_uartclk(struct uart_port *port, unsigned int uartcl= k); +void serial8250_do_set_termios(struct uart_port *port, struct ktermios *te= rmios, + const struct ktermios *old); +void serial8250_do_set_ldisc(struct uart_port *port, struct ktermios *term= ios); +unsigned int serial8250_do_get_mctrl(struct uart_port *port); +int serial8250_do_startup(struct uart_port *port); +void serial8250_do_shutdown(struct uart_port *port); +void serial8250_do_pm(struct uart_port *port, unsigned int state, + unsigned int oldstate); +void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl); +void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, + unsigned int quot, unsigned int quot_frac); +int fsl8250_handle_irq(struct uart_port *port); int serial8250_handle_irq(struct uart_port *port, unsigned int iir); u16 serial8250_rx_chars(struct uart_8250_port *up, u16 lsr); void serial8250_read_char(struct uart_8250_port *up, u16 lsr); @@ -183,9 +179,8 @@ void serial8250_console_write(struct uart_8250_port *up= , const char *s, int serial8250_console_setup(struct uart_port *port, char *options, bool p= robe); int serial8250_console_exit(struct uart_port *port); =20 -extern void serial8250_set_isa_configurator(void (*v) - (int port, struct uart_port *up, - u32 *capabilities)); +void serial8250_set_isa_configurator(void (*v)(int port, struct uart_port = *up, + u32 *capabilities)); =20 #ifdef CONFIG_SERIAL_8250_RT288X unsigned int au_serial_in(struct uart_port *p, int offset); diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 9e3e5e0d11b2..05d18a145b3a 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -812,9 +812,8 @@ extern const struct earlycon_id __earlycon_table_end[]; =20 #define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn) =20 -extern int of_setup_earlycon(const struct earlycon_id *match, - unsigned long node, - const char *options); +int of_setup_earlycon(const struct earlycon_id *match, unsigned long node, + const char *options); =20 #ifdef CONFIG_SERIAL_EARLYCON extern bool earlycon_acpi_spcr_enable __initdata; @@ -897,11 +896,11 @@ static inline bool uart_softcts_mode(struct uart_port= *uport) * The following are helper functions for the low level drivers. */ =20 -extern void uart_handle_dcd_change(struct uart_port *uport, bool active); -extern void uart_handle_cts_change(struct uart_port *uport, bool active); +void uart_handle_dcd_change(struct uart_port *uport, bool active); +void uart_handle_cts_change(struct uart_port *uport, bool active); =20 -extern void uart_insert_char(struct uart_port *port, unsigned int status, - unsigned int overrun, unsigned int ch, unsigned int flag); +void uart_insert_char(struct uart_port *port, unsigned int status, + unsigned int overrun, unsigned int ch, unsigned int flag); =20 void uart_xchar_out(struct uart_port *uport, int offset); =20 --=20 2.30.2 From nobody Wed Sep 10 10:43:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3386C6FD19 for ; Thu, 9 Mar 2023 08:11:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbjCIILX (ORCPT ); Thu, 9 Mar 2023 03:11:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230192AbjCIIKa (ORCPT ); Thu, 9 Mar 2023 03:10:30 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB9E1DBB51; Thu, 9 Mar 2023 00:09:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678349398; x=1709885398; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rJCyEkJNEsA+/cTIkJbgh5VawdlmNIWJoyG5MajweuI=; b=jS2+KEVRPPNOvVH1UuZZYGJ8KgPRDfFou3pvph8XEdMXCVVrwjUXOfyR URhwMjLZWttcxuJdMH5/DrnfRvxXbKAXHwb4rdv1E4MWCxNW85WyHPJF1 r6VHdQzyN9nerOtTlP+Y71Us8CeJLtHdl7hGZbK0gIXhY68nUoE0m253S Kz59a0u5uE34uHNhoC2q49Ie2p825WRCbyOjbXPlKS2f1OvuzHx6voJX3 c9dcpsgPeE7bLq+/a0EkBVLpM3dO5d4JoTCc/ry3PZwAtyVd2l8td0W2o g3h0NcL2Y7ZfBgng/HNMenBmsq52H0r5BL2YSmduS8koNVwBJpoNApdkw Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="333853588" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="333853588" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="746227986" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="746227986" Received: from unknown (HELO ijarvine-MOBL2.mshome.net) ([10.237.66.35]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:42 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 4/8] serial: Move uart_change_speed() earlier Date: Thu, 9 Mar 2023 10:09:19 +0200 Message-Id: <20230309080923.11778-5-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> References: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move uart_change_speed() earlier to get rid of its forward declaration. Signed-off-by: Ilpo J=C3=A4rvinen --- drivers/tty/serial/serial_core.c | 94 ++++++++++++++++---------------- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_c= ore.c index 296d2c33ea7a..7201bbc44fa7 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -49,8 +49,6 @@ static struct lock_class_key port_lock_key; */ #define RS485_MAX_RTS_DELAY 100 /* msecs */ =20 -static void uart_change_speed(struct tty_struct *tty, struct uart_state *s= tate, - const struct ktermios *old_termios); static void uart_wait_until_sent(struct tty_struct *tty, int timeout); static void uart_change_pm(struct uart_state *state, enum uart_pm_state pm_state); @@ -178,6 +176,52 @@ static void uart_port_dtr_rts(struct uart_port *uport,= bool active) uart_clear_mctrl(uport, TIOCM_DTR | TIOCM_RTS); } =20 +/* Caller holds port mutex */ +static void uart_change_speed(struct tty_struct *tty, struct uart_state *s= tate, + const struct ktermios *old_termios) +{ + struct uart_port *uport =3D uart_port_check(state); + struct ktermios *termios; + int hw_stopped; + + /* + * If we have no tty, termios, or the port does not exist, + * then we can't set the parameters for this port. + */ + if (!tty || uport->type =3D=3D PORT_UNKNOWN) + return; + + termios =3D &tty->termios; + uport->ops->set_termios(uport, termios, old_termios); + + /* + * Set modem status enables based on termios cflag + */ + spin_lock_irq(&uport->lock); + if (termios->c_cflag & CRTSCTS) + uport->status |=3D UPSTAT_CTS_ENABLE; + else + uport->status &=3D ~UPSTAT_CTS_ENABLE; + + if (termios->c_cflag & CLOCAL) + uport->status &=3D ~UPSTAT_DCD_ENABLE; + else + uport->status |=3D UPSTAT_DCD_ENABLE; + + /* reset sw-assisted CTS flow control based on (possibly) new mode */ + hw_stopped =3D uport->hw_stopped; + uport->hw_stopped =3D uart_softcts_mode(uport) && + !(uport->ops->get_mctrl(uport) & TIOCM_CTS); + if (uport->hw_stopped) { + if (!hw_stopped) + uport->ops->stop_tx(uport); + } else { + if (hw_stopped) + __uart_start(tty); + } + spin_unlock_irq(&uport->lock); +} + /* * Startup the port. This will be called once per open. All calls * will be serialised by the per-port mutex. @@ -486,52 +530,6 @@ uart_get_divisor(struct uart_port *port, unsigned int = baud) } EXPORT_SYMBOL(uart_get_divisor); =20 -/* Caller holds port mutex */ -static void uart_change_speed(struct tty_struct *tty, struct uart_state *s= tate, - const struct ktermios *old_termios) -{ - struct uart_port *uport =3D uart_port_check(state); - struct ktermios *termios; - int hw_stopped; - - /* - * If we have no tty, termios, or the port does not exist, - * then we can't set the parameters for this port. - */ - if (!tty || uport->type =3D=3D PORT_UNKNOWN) - return; - - termios =3D &tty->termios; - uport->ops->set_termios(uport, termios, old_termios); - - /* - * Set modem status enables based on termios cflag - */ - spin_lock_irq(&uport->lock); - if (termios->c_cflag & CRTSCTS) - uport->status |=3D UPSTAT_CTS_ENABLE; - else - uport->status &=3D ~UPSTAT_CTS_ENABLE; - - if (termios->c_cflag & CLOCAL) - uport->status &=3D ~UPSTAT_DCD_ENABLE; - else - uport->status |=3D UPSTAT_DCD_ENABLE; - - /* reset sw-assisted CTS flow control based on (possibly) new mode */ - hw_stopped =3D uport->hw_stopped; - uport->hw_stopped =3D uart_softcts_mode(uport) && - !(uport->ops->get_mctrl(uport) & TIOCM_CTS); - if (uport->hw_stopped) { - if (!hw_stopped) - uport->ops->stop_tx(uport); - } else { - if (hw_stopped) - __uart_start(tty); - } - spin_unlock_irq(&uport->lock); -} - static int uart_put_char(struct tty_struct *tty, unsigned char c) { struct uart_state *state =3D tty->driver_data; --=20 2.30.2 From nobody Wed Sep 10 10:43:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C161C61DA4 for ; Thu, 9 Mar 2023 08:12:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229989AbjCIIME (ORCPT ); Thu, 9 Mar 2023 03:12:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230093AbjCIILM (ORCPT ); Thu, 9 Mar 2023 03:11:12 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED3B0E1914; Thu, 9 Mar 2023 00:10:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678349411; x=1709885411; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UCn20Az7GPv1MH+6Zp/KBKOW/X6nkW75ErD/GRcZlfk=; b=IWy6OjSKLC1Q68vXcaZ55FVYEU85aRgQ9pMlR5wkdbeFtJhl2eHjW+At 7SFmvdW8D0qoln3GMxm9Ay2L4ejqqhKCGworHjvALGK+1xOzAWiPVFTuK XzQ3S8jQYnLWeFhxFXDzkg5qnEBXosBF61gQ1Z7BzMxm79TsrKZDzLLp0 /fido2WLMCbtB3Wdb15gcEEtoWxBKOGX+clOAiojtPqfV11ShuxXMS/OR +Cvv7x7JW4C9ZTWcER7uckxnO9Yu+Cshk13A5j9Lav2q+U6G+gjWjKgME N/6z4NThjZDrN//VJtYo7vCDpn2e69MtsXYV37gnb6aCwMp4QJ/+ng1+Q Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="333853601" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="333853601" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="746228001" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="746228001" Received: from unknown (HELO ijarvine-MOBL2.mshome.net) ([10.237.66.35]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:44 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 5/8] serial: Rename uart_change_speed() to uart_change_line_settings() Date: Thu, 9 Mar 2023 10:09:20 +0200 Message-Id: <20230309080923.11778-6-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> References: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org uart_change_speed() changes more than just speed so rename it to more generic uart_change_line_settings(). Signed-off-by: Ilpo J=C3=A4rvinen --- drivers/tty/serial/serial_core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_c= ore.c index 7201bbc44fa7..ecdc5d9cdb53 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -177,8 +177,8 @@ static void uart_port_dtr_rts(struct uart_port *uport, = bool active) } =20 /* Caller holds port mutex */ -static void uart_change_speed(struct tty_struct *tty, struct uart_state *s= tate, - const struct ktermios *old_termios) +static void uart_change_line_settings(struct tty_struct *tty, struct uart_= state *state, + const struct ktermios *old_termios) { struct uart_port *uport =3D uart_port_check(state); struct ktermios *termios; @@ -277,7 +277,7 @@ static int uart_port_startup(struct tty_struct *tty, st= ruct uart_state *state, /* * Initialise the hardware port settings. */ - uart_change_speed(tty, state, NULL); + uart_change_line_settings(tty, state, NULL); =20 /* * Setup the RTS and DTR signals once the @@ -993,7 +993,7 @@ static int uart_set_info(struct tty_struct *tty, struct= tty_port *port, current->comm, tty_name(port->tty)); } - uart_change_speed(tty, state, NULL); + uart_change_line_settings(tty, state, NULL); } } else { retval =3D uart_startup(tty, state, true); @@ -1655,7 +1655,7 @@ static void uart_set_termios(struct tty_struct *tty, goto out; } =20 - uart_change_speed(tty, state, old_termios); + uart_change_line_settings(tty, state, old_termios); /* reload cflag from termios; port driver may have overridden flags */ cflag =3D tty->termios.c_cflag; =20 @@ -2451,7 +2451,7 @@ int uart_resume_port(struct uart_driver *drv, struct = uart_port *uport) ret =3D ops->startup(uport); if (ret =3D=3D 0) { if (tty) - uart_change_speed(tty, state, NULL); + uart_change_line_settings(tty, state, NULL); spin_lock_irq(&uport->lock); if (!(uport->rs485.flags & SER_RS485_ENABLED)) ops->set_mctrl(uport, uport->mctrl); --=20 2.30.2 From nobody Wed Sep 10 10:43:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7337C61DA4 for ; Thu, 9 Mar 2023 08:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229891AbjCIIMP (ORCPT ); Thu, 9 Mar 2023 03:12:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230325AbjCIIL0 (ORCPT ); Thu, 9 Mar 2023 03:11:26 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D370EE062B; Thu, 9 Mar 2023 00:10:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678349414; x=1709885414; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NOuN9Fv5gO0pmI98uoE3O6yj9f/bKC+iD++4nKAJLCw=; b=PnfIP8wyW194aQblwRo4x1FqtG1poMmxv/R7XpWaBR+lumjCjODi+LZW bMwXH29CeILc3f/4IL/1XOShiVRr9FMER86sL/WoUwxepxK3fu8zX8aqb jv8imG36YFIHyDDjTeQn1Qi3ty0bWDYj9jcY4tRFDpaHTHQWlkDoI5rWj IcIKQj19NQSbt62Xywbs0cVxpCKHyr0NpfgHXMEDGF4dgqajxesNyOUZK +ZK2oBd4gF5ILMfdTO3vTnI2nMqgEcs2rplucv+KEhXq1QTdtDHg5OpEf mBNAkYNBQsxeh3GDUVh0R+4LANBpTloQkIwbtn2QZmT1H0HkfIaaUpVKo w==; X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="333853610" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="333853610" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="746228010" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="746228010" Received: from unknown (HELO ijarvine-MOBL2.mshome.net) ([10.237.66.35]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:47 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 6/8] serial: Make hw_stopped bool Date: Thu, 9 Mar 2023 10:09:21 +0200 Message-Id: <20230309080923.11778-7-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> References: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert hw_stopped in uart_port to bool because its more appropriate type for how it is used. Also convert the local variable in uart_change_line_settings() caching old hw_stopped to bool. Signed-off-by: Ilpo J=C3=A4rvinen --- drivers/tty/serial/serial_core.c | 6 +++--- include/linux/serial_core.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_c= ore.c index ecdc5d9cdb53..31b69e61e71d 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -182,7 +182,7 @@ static void uart_change_line_settings(struct tty_struct= *tty, struct uart_state { struct uart_port *uport =3D uart_port_check(state); struct ktermios *termios; - int hw_stopped; + bool hw_stopped; =20 /* * If we have no tty, termios, or the port does not exist, @@ -3304,13 +3304,13 @@ void uart_handle_cts_change(struct uart_port *uport= , bool active) if (uart_softcts_mode(uport)) { if (uport->hw_stopped) { if (active) { - uport->hw_stopped =3D 0; + uport->hw_stopped =3D false; uport->ops->start_tx(uport); uart_write_wakeup(uport); } } else { if (!active) { - uport->hw_stopped =3D 1; + uport->hw_stopped =3D true; uport->ops->stop_tx(uport); } } diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 05d18a145b3a..66ecec15a1bf 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -553,7 +553,7 @@ struct uart_port { #define UPSTAT_AUTOXOFF ((__force upstat_t) (1 << 4)) #define UPSTAT_SYNC_FIFO ((__force upstat_t) (1 << 5)) =20 - int hw_stopped; /* sw-assisted CTS flow state */ + bool hw_stopped; /* sw-assisted CTS flow state */ unsigned int mctrl; /* current modem ctrl settings */ unsigned int frame_time; /* frame timing in ns */ unsigned int type; /* port type */ --=20 2.30.2 From nobody Wed Sep 10 10:43:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF63FC64EC4 for ; Thu, 9 Mar 2023 08:12:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbjCIIM1 (ORCPT ); Thu, 9 Mar 2023 03:12:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230296AbjCIILn (ORCPT ); Thu, 9 Mar 2023 03:11:43 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30029DE1E2; Thu, 9 Mar 2023 00:10:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678349416; x=1709885416; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=N198pABiElaUVsS/ZpKV5b88vjIcEWFXshSTja0nvU4=; b=ZOTuLXnOM6fVra1tv4fxyQAXXG+4gVtXtmNxqhpQ+KJbeN/gZGtHStKf 2KgTmrDTY4akrm614cVN77RXRFfc8c3QohBFbIX4k3pO+5YM5Q7KUWyPM t+Lbi0/cLfIJm8ngxnvLhX7Kib7QBbO/7o26C/dQBLlstV7UANUUnGzfw 7BmPgrOpgo6mcqTMlHmklucGZKoiePKiQV5g8t3hleoUmbk70Nb4tUrlX bcWaISb2OqYjtGltm7KC5FKAnpPX8mvCPk5Nuja8iLRoRItGEyrQ1Bqsy FGFUPc717dnO9gw05mkM3X/4dEcheYjr0BQVMTJMbhsJeCnlNw0bboXFP g==; X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="333853624" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="333853624" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="746228016" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="746228016" Received: from unknown (HELO ijarvine-MOBL2.mshome.net) ([10.237.66.35]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:49 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 7/8] serial: Rename hw_stopped to old_hw_stopped & improve logic Date: Thu, 9 Mar 2023 10:09:22 +0200 Message-Id: <20230309080923.11778-8-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> References: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hw_stopped in uart_change_line_settings() stores old hw_stopped, thus rename it appropriately. Alter logic to check first if the hw_stopped was changed, and then pick which function to call if it was because the logic is more obvious that way. Signed-off-by: Ilpo J=C3=A4rvinen --- drivers/tty/serial/serial_core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_c= ore.c index 31b69e61e71d..c494cb39394b 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -182,7 +182,7 @@ static void uart_change_line_settings(struct tty_struct= *tty, struct uart_state { struct uart_port *uport =3D uart_port_check(state); struct ktermios *termios; - bool hw_stopped; + bool old_hw_stopped; =20 /* * If we have no tty, termios, or the port does not exist, @@ -209,14 +209,13 @@ static void uart_change_line_settings(struct tty_stru= ct *tty, struct uart_state uport->status |=3D UPSTAT_DCD_ENABLE; =20 /* reset sw-assisted CTS flow control based on (possibly) new mode */ - hw_stopped =3D uport->hw_stopped; + old_hw_stopped =3D uport->hw_stopped; uport->hw_stopped =3D uart_softcts_mode(uport) && !(uport->ops->get_mctrl(uport) & TIOCM_CTS); - if (uport->hw_stopped) { - if (!hw_stopped) + if (uport->hw_stopped !=3D old_hw_stopped) { + if (!old_hw_stopped) uport->ops->stop_tx(uport); - } else { - if (hw_stopped) + else __uart_start(tty); } spin_unlock_irq(&uport->lock); --=20 2.30.2 From nobody Wed Sep 10 10:43:36 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67E27C61DA4 for ; Thu, 9 Mar 2023 08:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230399AbjCIINB (ORCPT ); Thu, 9 Mar 2023 03:13:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229758AbjCIIMD (ORCPT ); Thu, 9 Mar 2023 03:12:03 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C1D1E2C41; Thu, 9 Mar 2023 00:10:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678349433; x=1709885433; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3/j3SVPlwDa6zr9LT83ubh5mFhbeuQYyePjcNkzEfHw=; b=k4vnbS34jIEGP1sGB/OdlTrtI6oT+SnydqgwiGnxIpX1UdHZUsoDBDNi dvrBk8PflChcSPSCoxEGC0088TO5cLQaUuOOOzp38V54wvpYgm6vtD36I g5w4VyAVJ9VrjTX1wLVCGYuegHLA2pcjJnVrO66r5DNt2UxlEQDTd/gaj IyFjtO8LgB++W1iGG9xtkaYWMXVEGLrHpEC9o1AL9f6Bnnj06KbySg0Px J14EudmakgFPH4zZ2PopQlr/oDSOG+b6PdIglgoTw1xjBS9ZPR/hursmf MJxvG9lc3K4FsLuznSNSlXTHhDtCc2gNnyhGduOvJVL1XQTDtWQbszBna A==; X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="333853636" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="333853636" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10643"; a="746228025" X-IronPort-AV: E=Sophos;i="5.98,245,1673942400"; d="scan'208";a="746228025" Received: from unknown (HELO ijarvine-MOBL2.mshome.net) ([10.237.66.35]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2023 00:09:52 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 8/8] serial: Remove uart_wait_until_sent() forward declaration Date: Thu, 9 Mar 2023 10:09:23 +0200 Message-Id: <20230309080923.11778-9-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> References: <20230309080923.11778-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecessary forward declaration of uart_wait_until_sent(). Signed-off-by: Ilpo J=C3=A4rvinen --- drivers/tty/serial/serial_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_c= ore.c index c494cb39394b..db7f6c0c39bf 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -49,7 +49,6 @@ static struct lock_class_key port_lock_key; */ #define RS485_MAX_RTS_DELAY 100 /* msecs */ =20 -static void uart_wait_until_sent(struct tty_struct *tty, int timeout); static void uart_change_pm(struct uart_state *state, enum uart_pm_state pm_state); =20 --=20 2.30.2