aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorPaul McQuade <paulmcquad@gmail.com>2014-06-06 17:37:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:08:14 -0400
commit46c0a8ca3e841b14a1d981e2116eaf2d1c7f2235 (patch)
tree44b72ebf4cb7c891f2cb8690aefd506251f49191 /ipc
parent7153e402731c3e72331633d1ac15a654768aecac (diff)
ipc, kernel: clear whitespace
trailing whitespace Signed-off-by: Paul McQuade <paulmcquad@gmail.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/msg.c31
-rw-r--r--ipc/sem.c10
-rw-r--r--ipc/shm.c2
-rw-r--r--ipc/util.c4
-rw-r--r--ipc/util.h8
5 files changed, 27 insertions, 28 deletions
diff --git a/ipc/msg.c b/ipc/msg.c
index d608e6dde919..7ed1ef338e76 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -611,23 +611,22 @@ SYSCALL_DEFINE3(msgctl, int, msqid, int, cmd, struct msqid_ds __user *, buf)
611 611
612static int testmsg(struct msg_msg *msg, long type, int mode) 612static int testmsg(struct msg_msg *msg, long type, int mode)
613{ 613{
614 switch (mode) 614 switch (mode) {
615 { 615 case SEARCH_ANY:
616 case SEARCH_ANY: 616 case SEARCH_NUMBER:
617 case SEARCH_NUMBER: 617 return 1;
618 case SEARCH_LESSEQUAL:
619 if (msg->m_type <= type)
618 return 1; 620 return 1;
619 case SEARCH_LESSEQUAL: 621 break;
620 if (msg->m_type <= type) 622 case SEARCH_EQUAL:
621 return 1; 623 if (msg->m_type == type)
622 break; 624 return 1;
623 case SEARCH_EQUAL: 625 break;
624 if (msg->m_type == type) 626 case SEARCH_NOTEQUAL:
625 return 1; 627 if (msg->m_type != type)
626 break; 628 return 1;
627 case SEARCH_NOTEQUAL: 629 break;
628 if (msg->m_type != type)
629 return 1;
630 break;
631 } 630 }
632 return 0; 631 return 0;
633} 632}
diff --git a/ipc/sem.c b/ipc/sem.c
index e8dcc72d5bef..fe0928a3d08b 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -160,7 +160,7 @@ static int sysvipc_sem_proc_show(struct seq_file *s, void *it);
160 * sem_array.pending{_alter,_cont}, 160 * sem_array.pending{_alter,_cont},
161 * sem_array.sem_undo: global sem_lock() for read/write 161 * sem_array.sem_undo: global sem_lock() for read/write
162 * sem_undo.proc_next: only "current" is allowed to read/write that field. 162 * sem_undo.proc_next: only "current" is allowed to read/write that field.
163 * 163 *
164 * sem_array.sem_base[i].pending_{const,alter}: 164 * sem_array.sem_base[i].pending_{const,alter}:
165 * global or semaphore sem_lock() for read/write 165 * global or semaphore sem_lock() for read/write
166 */ 166 */
@@ -1161,7 +1161,7 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,
1161 err = security_sem_semctl(NULL, cmd); 1161 err = security_sem_semctl(NULL, cmd);
1162 if (err) 1162 if (err)
1163 return err; 1163 return err;
1164 1164
1165 memset(&seminfo, 0, sizeof(seminfo)); 1165 memset(&seminfo, 0, sizeof(seminfo));
1166 seminfo.semmni = ns->sc_semmni; 1166 seminfo.semmni = ns->sc_semmni;
1167 seminfo.semmns = ns->sc_semmns; 1167 seminfo.semmns = ns->sc_semmns;
@@ -1181,7 +1181,7 @@ static int semctl_nolock(struct ipc_namespace *ns, int semid,
1181 } 1181 }
1182 max_id = ipc_get_maxid(&sem_ids(ns)); 1182 max_id = ipc_get_maxid(&sem_ids(ns));
1183 up_read(&sem_ids(ns).rwsem); 1183 up_read(&sem_ids(ns).rwsem);
1184 if (copy_to_user(p, &seminfo, sizeof(struct seminfo))) 1184 if (copy_to_user(p, &seminfo, sizeof(struct seminfo)))
1185 return -EFAULT; 1185 return -EFAULT;
1186 return (max_id < 0) ? 0 : max_id; 1186 return (max_id < 0) ? 0 : max_id;
1187 } 1187 }
@@ -1883,7 +1883,7 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
1883 /* We need to sleep on this operation, so we put the current 1883 /* We need to sleep on this operation, so we put the current
1884 * task into the pending queue and go to sleep. 1884 * task into the pending queue and go to sleep.
1885 */ 1885 */
1886 1886
1887 queue.sops = sops; 1887 queue.sops = sops;
1888 queue.nsops = nsops; 1888 queue.nsops = nsops;
1889 queue.undo = un; 1889 queue.undo = un;
@@ -2016,7 +2016,7 @@ int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
2016 return error; 2016 return error;
2017 atomic_inc(&undo_list->refcnt); 2017 atomic_inc(&undo_list->refcnt);
2018 tsk->sysvsem.undo_list = undo_list; 2018 tsk->sysvsem.undo_list = undo_list;
2019 } else 2019 } else
2020 tsk->sysvsem.undo_list = NULL; 2020 tsk->sysvsem.undo_list = NULL;
2021 2021
2022 return 0; 2022 return 0;
diff --git a/ipc/shm.c b/ipc/shm.c
index fe49fdd240a8..2b64b0d25bba 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -694,7 +694,7 @@ static inline unsigned long copy_shminfo_to_user(void __user *buf, struct shminf
694 out.shmmin = in->shmmin; 694 out.shmmin = in->shmmin;
695 out.shmmni = in->shmmni; 695 out.shmmni = in->shmmni;
696 out.shmseg = in->shmseg; 696 out.shmseg = in->shmseg;
697 out.shmall = in->shmall; 697 out.shmall = in->shmall;
698 698
699 return copy_to_user(buf, &out, sizeof(out)); 699 return copy_to_user(buf, &out, sizeof(out));
700 } 700 }
diff --git a/ipc/util.c b/ipc/util.c
index 9b3fa38afe2c..27d74e69fd57 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -183,7 +183,7 @@ void __init ipc_init_proc_interface(const char *path, const char *header,
183 * ipc_findkey - find a key in an ipc identifier set 183 * ipc_findkey - find a key in an ipc identifier set
184 * @ids: ipc identifier set 184 * @ids: ipc identifier set
185 * @key: key to find 185 * @key: key to find
186 * 186 *
187 * Returns the locked pointer to the ipc structure if found or NULL 187 * Returns the locked pointer to the ipc structure if found or NULL
188 * otherwise. If key is found ipc points to the owning ipc structure 188 * otherwise. If key is found ipc points to the owning ipc structure
189 * 189 *
@@ -538,7 +538,7 @@ int ipcperms(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp, short flag)
538 else if (in_group_p(ipcp->cgid) || in_group_p(ipcp->gid)) 538 else if (in_group_p(ipcp->cgid) || in_group_p(ipcp->gid))
539 granted_mode >>= 3; 539 granted_mode >>= 3;
540 /* is there some bit set in requested_mode but not in granted_mode? */ 540 /* is there some bit set in requested_mode but not in granted_mode? */
541 if ((requested_mode & ~granted_mode & 0007) && 541 if ((requested_mode & ~granted_mode & 0007) &&
542 !ns_capable(ns->user_ns, CAP_IPC_OWNER)) 542 !ns_capable(ns->user_ns, CAP_IPC_OWNER))
543 return -1; 543 return -1;
544 544
diff --git a/ipc/util.h b/ipc/util.h
index e1153ad574b7..1a5a0fcd099c 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -78,9 +78,9 @@ struct ipc_params {
78 * . routine to call for an extra check if needed 78 * . routine to call for an extra check if needed
79 */ 79 */
80struct ipc_ops { 80struct ipc_ops {
81 int (*getnew) (struct ipc_namespace *, struct ipc_params *); 81 int (*getnew)(struct ipc_namespace *, struct ipc_params *);
82 int (*associate) (struct kern_ipc_perm *, int); 82 int (*associate)(struct kern_ipc_perm *, int);
83 int (*more_checks) (struct kern_ipc_perm *, struct ipc_params *); 83 int (*more_checks)(struct kern_ipc_perm *, struct ipc_params *);
84}; 84};
85 85
86struct seq_file; 86struct seq_file;
@@ -142,7 +142,7 @@ struct kern_ipc_perm *ipcctl_pre_down_nolock(struct ipc_namespace *ns,
142 struct ipc64_perm *perm, int extra_perm); 142 struct ipc64_perm *perm, int extra_perm);
143 143
144#ifndef CONFIG_ARCH_WANT_IPC_PARSE_VERSION 144#ifndef CONFIG_ARCH_WANT_IPC_PARSE_VERSION
145 /* On IA-64, we always use the "64-bit version" of the IPC structures. */ 145/* On IA-64, we always use the "64-bit version" of the IPC structures. */
146# define ipc_parse_version(cmd) IPC_64 146# define ipc_parse_version(cmd) IPC_64
147#else 147#else
148int ipc_parse_version(int *cmd); 148int ipc_parse_version(int *cmd);