* [PATCH 2/2 V2] staging: dgnc: remove useless switch-case statements
@ 2017-03-14 2:07 Daeseok Youn
0 siblings, 0 replies; only message in thread
From: Daeseok Youn @ 2017-03-14 2:07 UTC (permalink / raw)
To: lidza.louina
Cc: markh, gregkh, driverdev-devel, devel, linux-kernel, kernel-janitors
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>
---
V2: The two patches in previous series are merged into one patch.
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 dc76e9f..854bd1d 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1790,16 +1790,8 @@ static int dgnc_tty_send_break(struct tty_struct *tty, int msec)
if (!bd || bd->magic != DGNC_BOARD_MAGIC)
return -EIO;
- switch (msec) {
- case -1:
+ if (msec < 0)
msec = 0xFFFF;
- break;
- case 0:
- msec = 0;
- break;
- default:
- break;
- }
spin_lock_irqsave(&ch->ch_lock, flags);
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-14 2:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 2:07 [PATCH 2/2 V2] staging: dgnc: remove useless switch-case statements Daeseok Youn
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®