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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun,  9 Nov 2014 02:22:17 +0100
From:	Konrad Zapalowicz <bergo.torino@...il.com>
To:	cascardo@...ux.vnet.ibm.com
Cc:	gregkh@...uxfoundation.org, jslaby@...e.cz,
	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
	Konrad Zapalowicz <bergo.torino@...il.com>
Subject: [PATCH 2/5] serial: jsm: Remove unnecessary if statement

The flow of {neo,cls}_param() shows that at this stage the baud rate
has a non-zero value. This fact makes the if clausule obsolete and
acknowledges it's removal.

Signed-off-by: Konrad Zapalowicz <bergo.torino@...il.com>
---
 drivers/tty/serial/jsm/jsm_cls.c | 3 ---
 drivers/tty/serial/jsm/jsm_neo.c | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_cls.c b/drivers/tty/serial/jsm/jsm_cls.c
index 3df9112..bfb0681 100644
--- a/drivers/tty/serial/jsm/jsm_cls.c
+++ b/drivers/tty/serial/jsm/jsm_cls.c
@@ -767,9 +767,6 @@ static void cls_param(struct jsm_channel *ch)
 	ier = readb(&ch->ch_cls_uart->ier);
 	uart_lcr = readb(&ch->ch_cls_uart->lcr);
 
-	if (baud == 0)
-		baud = 9600;
-
 	quot = ch->ch_bd->bd_dividend / baud;
 
 	if (quot != 0) {
diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c
index b9faee7..4b8196d 100644
--- a/drivers/tty/serial/jsm/jsm_neo.c
+++ b/drivers/tty/serial/jsm/jsm_neo.c
@@ -1037,9 +1037,6 @@ static void neo_param(struct jsm_channel *ch)
 	ier = readb(&ch->ch_neo_uart->ier);
 	uart_lcr = readb(&ch->ch_neo_uart->lcr);
 
-	if (baud == 0)
-		baud = 9600;
-
 	quot = ch->ch_bd->bd_dividend / baud;
 
 	if (quot != 0) {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists