diff options
author | Davidlohr Bueso <davidlohr@hp.com> | 2014-01-27 20:07:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-28 00:02:39 -0500 |
commit | 3ab08fe20475658bab65118d599d03cd8ca44dd1 (patch) | |
tree | 25f4f43e58aad6a4c286a098f1f1f9d69452c30d /ipc | |
parent | 8001c85810dd2277d75ae60376e840456afa9b7e (diff) |
ipc: remove braces for single statements
Deal with checkpatch messages:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/compat.c | 18 | ||||
-rw-r--r-- | ipc/mqueue.c | 6 | ||||
-rw-r--r-- | ipc/sem.c | 8 | ||||
-rw-r--r-- | ipc/util.c | 3 |
4 files changed, 16 insertions, 19 deletions
diff --git a/ipc/compat.c b/ipc/compat.c index ed0530beef0b..f71e962756d8 100644 --- a/ipc/compat.c +++ b/ipc/compat.c | |||
@@ -288,11 +288,11 @@ static long do_compat_semctl(int first, int second, int third, u32 pad) | |||
288 | break; | 288 | break; |
289 | 289 | ||
290 | case IPC_SET: | 290 | case IPC_SET: |
291 | if (version == IPC_64) { | 291 | if (version == IPC_64) |
292 | err = get_compat_semid64_ds(&s64, compat_ptr(pad)); | 292 | err = get_compat_semid64_ds(&s64, compat_ptr(pad)); |
293 | } else { | 293 | else |
294 | err = get_compat_semid_ds(&s64, compat_ptr(pad)); | 294 | err = get_compat_semid_ds(&s64, compat_ptr(pad)); |
295 | } | 295 | |
296 | up64 = compat_alloc_user_space(sizeof(s64)); | 296 | up64 = compat_alloc_user_space(sizeof(s64)); |
297 | if (copy_to_user(up64, &s64, sizeof(s64))) | 297 | if (copy_to_user(up64, &s64, sizeof(s64))) |
298 | err = -EFAULT; | 298 | err = -EFAULT; |
@@ -515,11 +515,11 @@ long compat_sys_msgctl(int first, int second, void __user *uptr) | |||
515 | break; | 515 | break; |
516 | 516 | ||
517 | case IPC_SET: | 517 | case IPC_SET: |
518 | if (version == IPC_64) { | 518 | if (version == IPC_64) |
519 | err = get_compat_msqid64(&m64, uptr); | 519 | err = get_compat_msqid64(&m64, uptr); |
520 | } else { | 520 | else |
521 | err = get_compat_msqid(&m64, uptr); | 521 | err = get_compat_msqid(&m64, uptr); |
522 | } | 522 | |
523 | if (err) | 523 | if (err) |
524 | break; | 524 | break; |
525 | p = compat_alloc_user_space(sizeof(m64)); | 525 | p = compat_alloc_user_space(sizeof(m64)); |
@@ -702,11 +702,11 @@ long compat_sys_shmctl(int first, int second, void __user *uptr) | |||
702 | 702 | ||
703 | 703 | ||
704 | case IPC_SET: | 704 | case IPC_SET: |
705 | if (version == IPC_64) { | 705 | if (version == IPC_64) |
706 | err = get_compat_shmid64_ds(&s64, uptr); | 706 | err = get_compat_shmid64_ds(&s64, uptr); |
707 | } else { | 707 | else |
708 | err = get_compat_shmid_ds(&s64, uptr); | 708 | err = get_compat_shmid_ds(&s64, uptr); |
709 | } | 709 | |
710 | if (err) | 710 | if (err) |
711 | break; | 711 | break; |
712 | p = compat_alloc_user_space(sizeof(s64)); | 712 | p = compat_alloc_user_space(sizeof(s64)); |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index bb36aaeb58a0..ccf1f9fd263a 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -1303,11 +1303,11 @@ retry: | |||
1303 | out_fput: | 1303 | out_fput: |
1304 | fdput(f); | 1304 | fdput(f); |
1305 | out: | 1305 | out: |
1306 | if (sock) { | 1306 | if (sock) |
1307 | netlink_detachskb(sock, nc); | 1307 | netlink_detachskb(sock, nc); |
1308 | } else if (nc) { | 1308 | else if (nc) |
1309 | dev_kfree_skb(nc); | 1309 | dev_kfree_skb(nc); |
1310 | } | 1310 | |
1311 | return ret; | 1311 | return ret; |
1312 | } | 1312 | } |
1313 | 1313 | ||
@@ -492,9 +492,9 @@ static int newary(struct ipc_namespace *ns, struct ipc_params *params) | |||
492 | 492 | ||
493 | size = sizeof(*sma) + nsems * sizeof(struct sem); | 493 | size = sizeof(*sma) + nsems * sizeof(struct sem); |
494 | sma = ipc_rcu_alloc(size); | 494 | sma = ipc_rcu_alloc(size); |
495 | if (!sma) { | 495 | if (!sma) |
496 | return -ENOMEM; | 496 | return -ENOMEM; |
497 | } | 497 | |
498 | memset(sma, 0, size); | 498 | memset(sma, 0, size); |
499 | 499 | ||
500 | sma->sem_perm.mode = (semflg & S_IRWXUGO); | 500 | sma->sem_perm.mode = (semflg & S_IRWXUGO); |
@@ -1967,10 +1967,8 @@ sleep_again: | |||
1967 | * If queue.status != -EINTR we are woken up by another process. | 1967 | * If queue.status != -EINTR we are woken up by another process. |
1968 | * Leave without unlink_queue(), but with sem_unlock(). | 1968 | * Leave without unlink_queue(), but with sem_unlock(). |
1969 | */ | 1969 | */ |
1970 | 1970 | if (error != -EINTR) | |
1971 | if (error != -EINTR) { | ||
1972 | goto out_unlock_free; | 1971 | goto out_unlock_free; |
1973 | } | ||
1974 | 1972 | ||
1975 | /* | 1973 | /* |
1976 | * If an interrupt occurred we have to clean up the queue | 1974 | * If an interrupt occurred we have to clean up the queue |
diff --git a/ipc/util.c b/ipc/util.c index af976fc6a464..cfbd8fafb19b 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -183,9 +183,8 @@ void __init ipc_init_proc_interface(const char *path, const char *header, | |||
183 | NULL, /* parent dir */ | 183 | NULL, /* parent dir */ |
184 | &sysvipc_proc_fops, | 184 | &sysvipc_proc_fops, |
185 | iface); | 185 | iface); |
186 | if (!pde) { | 186 | if (!pde) |
187 | kfree(iface); | 187 | kfree(iface); |
188 | } | ||
189 | } | 188 | } |
190 | #endif | 189 | #endif |
191 | 190 | ||