lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190729195226.8862-13-andrew.smirnov@gmail.com>
Date:   Mon, 29 Jul 2019 12:52:14 -0700
From:   Andrey Smirnov <andrew.smirnov@...il.com>
To:     linux-serial@...r.kernel.org
Cc:     Andrey Smirnov <andrew.smirnov@...il.com>,
        Stefan Agner <stefan@...er.ch>,
        Bhuvanchandra DV <bhuvanchandra.dv@...adex.com>,
        Chris Healy <cphealy@...il.com>,
        Cory Tusar <cory.tusar@....aero>,
        Lucas Stach <l.stach@...gutronix.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>, linux-imx@....com,
        linux-kernel@...r.kernel.org
Subject: [PATCH 12/24] tty: serial: fsl_lpuart: Clear CSTOPB unconditionally

Clearing CSTOPB bit if it is set is functionally equivalent to jsut
clearing it unconditionally. Drop unnecessary check.

Signed-off-by: Andrey Smirnov <andrew.smirnov@...il.com>
Cc: Stefan Agner <stefan@...er.ch>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@...adex.com>
Cc: Chris Healy <cphealy@...il.com>
Cc: Cory Tusar <cory.tusar@....aero>
Cc: Lucas Stach <l.stach@...gutronix.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.com>
Cc: linux-imx@....com
Cc: linux-serial@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
 drivers/tty/serial/fsl_lpuart.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 5a1e19733353..10f1af51c58d 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1656,8 +1656,7 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
 	else
 		modem &= ~(UARTMODEM_RXRTSE | UARTMODEM_TXCTSE);
 
-	if (termios->c_cflag & CSTOPB)
-		termios->c_cflag &= ~CSTOPB;
+	termios->c_cflag &= ~CSTOPB;
 
 	/* parity must be enabled when CS7 to match 8-bits format */
 	if ((termios->c_cflag & CSIZE) == CS7)
-- 
2.21.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ