mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Zapalowicz <bergo.torino@gmail.com>
To: cascardo@linux.vnet.ibm.com
Cc: gregkh@linuxfoundation.org, jslaby@suse.cz,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	Konrad Zapalowicz <bergo.torino@gmail.com>
Subject: [PATCH 2/5] serial: jsm: Remove unnecessary if statement
Date: Sun,  9 Nov 2014 02:22:17 +0100	[thread overview]
Message-ID: <1415496140-14997-3-git-send-email-bergo.torino@gmail.com> (raw)
In-Reply-To: <1415496140-14997-2-git-send-email-bergo.torino@gmail.com>

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@gmail.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


  reply	other threads:[~2014-11-09  1:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09  1:22 [PATCH 0/5] serial: jsm: Provide better code quality Konrad Zapalowicz
2014-11-09  1:22 ` [PATCH 1/5] serial: jsm: Remove unnecessary parameter from clear_break() Konrad Zapalowicz
2014-11-09  1:22   ` Konrad Zapalowicz [this message]
2014-11-09  1:22     ` [PATCH 3/5] serial: jsm: Fix the alignment of the switch satement Konrad Zapalowicz
2014-11-09  1:22       ` [PATCH 4/5] serial: jsm: Replace magic value with the proper define Konrad Zapalowicz
2014-11-09  1:22         ` [PATCH 5/5] serial: jsm: Fix unnecessary space before function ptr arguments Konrad Zapalowicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1415496140-14997-3-git-send-email-bergo.torino@gmail.com \
    --to=bergo.torino@gmail.com \
    --cc=cascardo@linux.vnet.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®