Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1598645 > unrolled thread

[PATCH 2/3] staging: dgnc: remove useless switch-case statements

Started byDaeseok Youn <daeseok.youn@gmail.com>
First post2017-03-12 15:50 +0100
Last post2017-03-12 15:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 2/3] staging: dgnc: remove useless switch-case statements Daeseok Youn <daeseok.youn@gmail.com> - 2017-03-12 15:50 +0100

#1598645 — [PATCH 2/3] staging: dgnc: remove useless switch-case statements

FromDaeseok Youn <daeseok.youn@gmail.com>
Date2017-03-12 15:50 +0100
Subject[PATCH 2/3] staging: dgnc: remove useless switch-case statements
Message-ID<tkcYN-2Pm-1@gated-at.bofh.it>
The dgnc_tty_send_break() has a switch-case condition for msec.
It is no use except case -1.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/dgnc/dgnc_tty.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index c563ee3..7133d2c 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1786,16 +1786,8 @@ static int dgnc_tty_send_break(struct tty_struct *tty, int msec)
 	if (!bd || bd->magic != DGNC_BOARD_MAGIC)
 		return ret;
 
-	switch (msec) {
-	case -1:
+	if (msec < 0)
 		msec = 0xFFFF;
-		break;
-	case 0:
-		msec = 0;
-		break;
-	default:
-		break;
-	}
 
 	spin_lock_irqsave(&ch->ch_lock, flags);
 
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web