From: Thomas Wood <tommyandrena@gmail.com>
To: dan.carpenter@oracle.com
Cc: marek.belisko@gmail.com, devel@driverdev.osuosl.org,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
Thomas Wood <tommyandrena@gmail.com>
Subject: [PATCH v2 4/5] staging: ft1000: ft1000-usb: ft1000_debug.c: Remove unnecessary braces.
Date: Fri, 6 Jun 2014 20:02:17 -0700 [thread overview]
Message-ID: <1402110138-13713-5-git-send-email-tommyandrena@gmail.com> (raw)
In-Reply-To: <1402110138-13713-1-git-send-email-tommyandrena@gmail.com>
Remove unnecessary braces from single statement if blocks.
Signed-off-by: Thomas Wood <tommyandrena@gmail.com>
---
drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
index 5e371b7..94fb9f9 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c
@@ -319,9 +319,8 @@ static int ft1000_open(struct inode *inode, struct file *file)
/* Search for available application info block */
for (i = 0; i < MAX_NUM_APP; i++) {
- if ((dev->app_info[i].fileobject == NULL)) {
+ if ((dev->app_info[i].fileobject == NULL))
break;
- }
}
/* Fail due to lack of application info block */
@@ -540,17 +539,14 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
/* DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_SET_DPRAM called\n");*/
- if (ft1000_flarion_cnt == 0) {
+ if (ft1000_flarion_cnt == 0)
return (-EBADF);
- }
- if (ft1000dev->DrvMsgPend) {
+ if (ft1000dev->DrvMsgPend)
return (-ENOTTY);
- }
- if (ft1000dev->fProvComplete == 0) {
+ if (ft1000dev->fProvComplete == 0)
return (-EACCES);
- }
ft1000dev->fAppMsgPend = 1;
@@ -582,9 +578,8 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
} else {
/* Check if this message came from a registered application */
for (i = 0; i < MAX_NUM_APP; i++) {
- if (ft1000dev->app_info[i].fileobject == &file->f_owner) {
+ if (ft1000dev->app_info[i].fileobject == &file->f_owner)
break;
- }
}
if (i == MAX_NUM_APP) {
DEBUG("FT1000:No matching application fileobject\n");
@@ -636,9 +631,8 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
pmsg = (u16 *)&dpram_data->pseudohdr;
ppseudo_hdr = (struct pseudo_hdr *)pmsg;
total_len = msgsz+2;
- if (total_len & 0x1) {
+ if (total_len & 0x1)
total_len++;
- }
/* Insert slow queue sequence number */
ppseudo_hdr->seq_num = info->squeseqnum++;
@@ -677,9 +671,8 @@ static long ft1000_ioctl(struct file *file, unsigned int command,
/* DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_GET_DPRAM called\n"); */
- if (ft1000_flarion_cnt == 0) {
+ if (ft1000_flarion_cnt == 0)
return (-EBADF);
- }
/* Search for matching file object */
for (i = 0; i < MAX_NUM_APP; i++) {
--
1.9.1
next prev parent reply other threads:[~2014-06-07 3:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 2:26 [PATCH] staging: ft1000: ft1000-usb: ft1000_debug.c: Fix style errors and some warnings Thomas Wood
2014-06-02 10:30 ` Dan Carpenter
2014-06-02 19:23 ` Thomas Wood
2014-06-07 3:02 ` [PATCH v2 0/5] staging: ft1000: ft1000-usb: ft1000_debug.c: Fix style errors and warnings Thomas Wood
2014-06-07 3:02 ` [PATCH v2 1/5] staging: ft1000: ft1000-usb: ft1000_debug.c: Replace spaces with tabs Thomas Wood
2014-06-07 3:02 ` [PATCH v2 2/5] staging: ft1000: ft1000-usb: ft1000_debug.c: Add required spaces Thomas Wood
2014-06-07 3:02 ` [PATCH v2 3/5] staging: ft1000: ft1000-usb: ft1000_debug.c: Remove unnecessary whitespace Thomas Wood
2014-06-07 3:02 ` Thomas Wood [this message]
2014-06-07 3:02 ` [PATCH v2 5/5] staging: ft1000: ft1000-usb: ft1000_debug.c: Misc. fixes Thomas Wood
2014-06-09 7:16 ` Dan Carpenter
2014-06-20 0:01 ` Greg KH
2014-06-07 16:56 ` [PATCH v2 0/5] staging: ft1000: ft1000-usb: ft1000_debug.c: Fix style errors and warnings Greg KH
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=1402110138-13713-5-git-send-email-tommyandrena@gmail.com \
--to=tommyandrena@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.belisko@gmail.com \
/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®