From: Masaru Nomura <massa.nomura@gmail.com>
To: lidza.louina@gmail.com, markh@compro.net
Cc: gregkh@linuxfoundation.org,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Masaru Nomura <massa.nomura@gmail.com>
Subject: [PATCH 4/4] staging: dgnc: Remove unnecessary braces
Date: Sat, 17 May 2014 17:30:54 +0100 [thread overview]
Message-ID: <1400344254-13007-5-git-send-email-massa.nomura@gmail.com> (raw)
In-Reply-To: <1400344254-13007-1-git-send-email-massa.nomura@gmail.com>
Remove unnecessary braces of if-else statements in dgnc_neo.c and
dgnc_tty.c to meet kernel coding style.
Signed-off-by: Masaru Nomura <massa.nomura@gmail.com>
---
drivers/staging/dgnc/dgnc_neo.c | 20 ++++++++------------
drivers/staging/dgnc/dgnc_tty.c | 10 ++++------
2 files changed, 12 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index c211f9f..c4ab17b 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -828,11 +828,10 @@ static void neo_param(struct tty_struct *tty)
if (uart_lcr != lcr)
writeb(lcr, &ch->ch_neo_uart->lcr);
- if (ch->ch_c_cflag & CREAD) {
+ if (ch->ch_c_cflag & CREAD)
ier |= (UART_IER_RDI | UART_IER_RLSI);
- } else {
+ else
ier &= ~(UART_IER_RDI | UART_IER_RLSI);
- }
/*
* Have the UART interrupt on modem signal changes ONLY when
@@ -842,11 +841,10 @@ static void neo_param(struct tty_struct *tty)
|| (ch->ch_digi.digi_flags & RTSPACE)
|| (ch->ch_c_cflag & CRTSCTS)
|| !(ch->ch_digi.digi_flags & DIGI_FORCEDCD)
- || !(ch->ch_c_cflag & CLOCAL)) {
+ || !(ch->ch_c_cflag & CLOCAL))
ier |= UART_IER_MSI;
- } else {
+ else
ier &= ~UART_IER_MSI;
- }
ier |= UART_IER_THRI;
@@ -1216,11 +1214,10 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
* The count can be any where from 0-3 bytes "off".
* Bizarre, but true.
*/
- if ((ch->ch_bd->dvid & 0xf0) >= UART_XR17E158_DVID) {
+ if ((ch->ch_bd->dvid & 0xf0) >= UART_XR17E158_DVID)
total -= 1;
- } else {
+ else
total -= 3;
- }
}
@@ -1423,11 +1420,10 @@ static int neo_drain(struct tty_struct *tty, uint seconds)
rc = wait_event_interruptible(un->un_flags_wait, ((un->un_flags & UN_EMPTY) == 0));
/* If ret is non-zero, user ctrl-c'ed us */
- if (rc) {
+ if (rc)
DPR_IOCTL(("%d Drain - User ctrl c'ed\n", __LINE__));
- } else {
+ else
DPR_IOCTL(("%d Drain wait finished.\n", __LINE__));
- }
return rc;
}
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index e432c04..cda2254 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -2549,17 +2549,15 @@ static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, uns
case TIOCMSET:
- if (arg & TIOCM_RTS) {
+ if (arg & TIOCM_RTS)
ch->ch_mostat |= UART_MCR_RTS;
- } else {
+ else
ch->ch_mostat &= ~(UART_MCR_RTS);
- }
- if (arg & TIOCM_DTR) {
+ if (arg & TIOCM_DTR)
ch->ch_mostat |= UART_MCR_DTR;
- } else {
+ else
ch->ch_mostat &= ~(UART_MCR_DTR);
- }
break;
--
1.7.9.5
prev parent reply other threads:[~2014-05-17 16:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-17 16:30 [PATCH 0/4] Fix coding style of if statement Masaru Nomura
2014-05-17 16:30 ` [PATCH 1/4] staging: dgnc: Fix indenting of if-else statement Masaru Nomura
2014-05-17 16:30 ` [PATCH 2/4] staging: dgnc: dgnc_neo: Fix indenting of if statement Masaru Nomura
2014-05-17 16:30 ` [PATCH 3/4] staging: dgnc: dgnc_neo: Fix conditional part " Masaru Nomura
2014-05-17 19:39 ` Dan Carpenter
2014-05-17 21:14 ` Masaru Nomura
2014-05-17 21:23 ` Dan Carpenter
2014-05-17 16:30 ` Masaru Nomura [this message]
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=1400344254-13007-5-git-send-email-massa.nomura@gmail.com \
--to=massa.nomura@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markh@compro.net \
/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®