Commit 28028313134e9f11e49f74a4beaa47c91e5ebf06
Committed by
Linus Torvalds
1 parent
ce621f5ba5
Exists in
master
and in
4 other branches
ipc: inline ipc_buildid()
This is a trivial patch that changes the ipc_buildid() routine into a static inline. Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 5 additions and 6 deletions Side-by-side Diff
ipc/util.c
ipc/util.h
... | ... | @@ -107,7 +107,6 @@ |
107 | 107 | void ipc_rcu_putref(void *ptr); |
108 | 108 | |
109 | 109 | struct kern_ipc_perm *ipc_lock(struct ipc_ids *, int); |
110 | -int ipc_buildid(struct ipc_ids* ids, int id, int seq); | |
111 | 110 | |
112 | 111 | void kernel_to_ipc64_perm(struct kern_ipc_perm *in, struct ipc64_perm *out); |
113 | 112 | void ipc64_perm_to_ipc_perm(struct ipc64_perm *in, struct ipc_perm *out); |
... | ... | @@ -126,6 +125,11 @@ |
126 | 125 | struct ipc_ops *, struct ipc_params *); |
127 | 126 | extern int ipcget_public(struct ipc_namespace *, struct ipc_ids *, |
128 | 127 | struct ipc_ops *, struct ipc_params *); |
128 | + | |
129 | +static inline int ipc_buildid(struct ipc_ids *ids, int id, int seq) | |
130 | +{ | |
131 | + return SEQ_MULTIPLIER * seq + id; | |
132 | +} | |
129 | 133 | |
130 | 134 | static inline int ipc_checkid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp, |
131 | 135 | int uid) |