Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1466929
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/7] aacraid: Delete unnecessary braces |
| Date | 2016-08-21 09:30 +0200 |
| Message-ID | <s8vmF-5Nj-3@gated-at.bofh.it> (permalink) |
| References | <qEuGl-43C-5@gated-at.bofh.it> <s8vcZ-5ID-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 21 Aug 2016 07:07:08 +0200
Do not use curly brackets at some source code places
where a single statement should be sufficient.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/scsi/aacraid/commctrl.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index 49a664f..9f4ddb0 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -66,13 +66,11 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
unsigned int size, osize;
int retval;
- if (dev->in_reset) {
+ if (dev->in_reset)
return -EBUSY;
- }
fibptr = aac_fib_alloc(dev);
- if(fibptr == NULL) {
+ if (!fibptr)
return -ENOMEM;
- }
kfib = fibptr->hw_fib_va;
/*
@@ -138,9 +136,8 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
retval = aac_fib_send(le16_to_cpu(kfib->header.Command), fibptr,
le16_to_cpu(kfib->header.Size) , FsaNormal,
1, 1, NULL, NULL);
- if (retval) {
+ if (retval)
goto cleanup;
- }
if (aac_fib_complete(fibptr) != 0) {
retval = -EINVAL;
goto cleanup;
@@ -228,12 +225,10 @@ static int open_getadapter_fib(struct aac_dev * dev, void __user *arg)
}
list_add_tail(&fibctx->next, &dev->fib_list);
spin_unlock_irqrestore(&dev->fib_lock, flags);
- if (copy_to_user(arg, &fibctx->unique,
- sizeof(fibctx->unique))) {
+ if (copy_to_user(arg, &fibctx->unique, sizeof(fibctx->unique)))
status = -EFAULT;
- } else {
+ else
status = 0;
- }
}
return status;
}
@@ -820,9 +815,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
free_user_srbcmd:
kfree(user_srbcmd);
free_sg_list:
- for(i=0; i <= sg_indx; i++){
+ for (i = 0; i <= sg_indx; i++)
kfree(sg_list[i]);
- }
if (rcode != -ERESTARTSYS) {
aac_fib_complete(srbfib);
aac_fib_free(srbfib);
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/7] aacraid: Fine-tuning for a few functions SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:20 +0200 [PATCH 5/7] aacraid: Add spaces after control flow keywords SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200 [PATCH 4/7] aacraid: Delete unnecessary braces SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200 [PATCH 2/7] aacraid: One function call less in aac_send_raw_srb() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200 [PATCH 3/7] aacraid: Delete unnecessary initialisations in aac_send_raw_srb() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200 [PATCH 6/7] aacraid: Improve determination of a few sizes SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:30 +0200 [PATCH 7/7] aacraid: Apply another recommendation from "checkpatch.pl" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-21 09:40 +0200
csiph-web