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-next>] [day] [month] [year] [list]
Message-Id: <1558933288-30023-1-git-send-email-sugaya.taichi@socionext.com>
Date:   Mon, 27 May 2019 14:01:27 +0900
From:   Sugaya Taichi <sugaya.taichi@...ionext.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>
Cc:     Takao Orito <orito.takao@...ionext.com>,
        Kazuhiro Kasai <kasai.kazuhiro@...ionext.com>,
        Shinji Kanematsu <kanematsu.shinji@...ionext.com>,
        Jassi Brar <jaswinder.singh@...aro.org>,
        Masami Hiramatsu <masami.hiramatsu@...aro.org>,
        linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
        Sugaya Taichi <sugaya.taichi@...ionext.com>
Subject: [PATCH] serial: Fix an invalid comparing statement

Drop the if-statement which refers to 8th bit field of u8 variable.
The bit field is no longer used.

Fixes: ba44dc043004 ("serial: Add Milbeaut serial control")
Reported-by: Colin Ian King <colin.king@...onical.com>
Signed-off-by: Sugaya Taichi <sugaya.taichi@...ionext.com>
---
 drivers/tty/serial/milbeaut_usio.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/tty/serial/milbeaut_usio.c b/drivers/tty/serial/milbeaut_usio.c
index 949ab7e..d7207ab 100644
--- a/drivers/tty/serial/milbeaut_usio.c
+++ b/drivers/tty/serial/milbeaut_usio.c
@@ -56,7 +56,6 @@
 #define MLB_USIO_SSR_FRE		BIT(4)
 #define MLB_USIO_SSR_PE			BIT(5)
 #define MLB_USIO_SSR_REC		BIT(7)
-#define MLB_USIO_SSR_BRK		BIT(8)
 #define MLB_USIO_FCR_FE1		BIT(0)
 #define MLB_USIO_FCR_FE2		BIT(1)
 #define MLB_USIO_FCR_FCL1		BIT(2)
@@ -180,18 +179,14 @@ static void mlb_usio_rx_chars(struct uart_port *port)
 		if (status & MLB_USIO_SSR_ORE)
 			port->icount.overrun++;
 		status &= port->read_status_mask;
-		if (status & MLB_USIO_SSR_BRK) {
-			flag = TTY_BREAK;
+		if (status & MLB_USIO_SSR_PE) {
+			flag = TTY_PARITY;
 			ch = 0;
 		} else
-			if (status & MLB_USIO_SSR_PE) {
-				flag = TTY_PARITY;
+			if (status & MLB_USIO_SSR_FRE) {
+				flag = TTY_FRAME;
 				ch = 0;
-			} else
-				if (status & MLB_USIO_SSR_FRE) {
-					flag = TTY_FRAME;
-					ch = 0;
-				}
+			}
 		if (flag)
 			uart_insert_char(port, status, MLB_USIO_SSR_ORE,
 					 ch, flag);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ