diff options
author | Nadia Derbey <Nadia.Derbey@bull.net> | 2007-10-19 02:40:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:48 -0400 |
commit | 1b531f213661657d6e1c55cf5c97f649d630c227 (patch) | |
tree | 0e03a4f286a12b383b9de455c0f39946df867fb7 /ipc/util.h | |
parent | 3e148c79938aa39035669c1cfa3ff60722134535 (diff) |
ipc: remove unneeded parameters
Remvoe the unneeded parameters from ipc_checkid() and ipc_buildid()
interfaces.
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>
Diffstat (limited to 'ipc/util.h')
-rw-r--r-- | ipc/util.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ipc/util.h b/ipc/util.h index bd47687077e0..9ffea40457ce 100644 --- a/ipc/util.h +++ b/ipc/util.h | |||
@@ -134,7 +134,7 @@ extern int ipcget_new(struct ipc_namespace *, struct ipc_ids *, | |||
134 | extern int ipcget_public(struct ipc_namespace *, struct ipc_ids *, | 134 | extern int ipcget_public(struct ipc_namespace *, struct ipc_ids *, |
135 | struct ipc_ops *, struct ipc_params *); | 135 | struct ipc_ops *, struct ipc_params *); |
136 | 136 | ||
137 | static inline int ipc_buildid(struct ipc_ids *ids, int id, int seq) | 137 | static inline int ipc_buildid(int id, int seq) |
138 | { | 138 | { |
139 | return SEQ_MULTIPLIER * seq + id; | 139 | return SEQ_MULTIPLIER * seq + id; |
140 | } | 140 | } |
@@ -142,8 +142,7 @@ static inline int ipc_buildid(struct ipc_ids *ids, int id, int seq) | |||
142 | /* | 142 | /* |
143 | * Must be called with ipcp locked | 143 | * Must be called with ipcp locked |
144 | */ | 144 | */ |
145 | static inline int ipc_checkid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp, | 145 | static inline int ipc_checkid(struct kern_ipc_perm *ipcp, int uid) |
146 | int uid) | ||
147 | { | 146 | { |
148 | if (uid / SEQ_MULTIPLIER != ipcp->seq) | 147 | if (uid / SEQ_MULTIPLIER != ipcp->seq) |
149 | return 1; | 148 | return 1; |
@@ -171,7 +170,7 @@ static inline struct kern_ipc_perm *ipc_lock_check_down(struct ipc_ids *ids, | |||
171 | if (IS_ERR(out)) | 170 | if (IS_ERR(out)) |
172 | return out; | 171 | return out; |
173 | 172 | ||
174 | if (ipc_checkid(ids, out, id)) { | 173 | if (ipc_checkid(out, id)) { |
175 | ipc_unlock(out); | 174 | ipc_unlock(out); |
176 | return ERR_PTR(-EIDRM); | 175 | return ERR_PTR(-EIDRM); |
177 | } | 176 | } |
@@ -188,7 +187,7 @@ static inline struct kern_ipc_perm *ipc_lock_check(struct ipc_ids *ids, | |||
188 | if (IS_ERR(out)) | 187 | if (IS_ERR(out)) |
189 | return out; | 188 | return out; |
190 | 189 | ||
191 | if (ipc_checkid(ids, out, id)) { | 190 | if (ipc_checkid(out, id)) { |
192 | ipc_unlock(out); | 191 | ipc_unlock(out); |
193 | return ERR_PTR(-EIDRM); | 192 | return ERR_PTR(-EIDRM); |
194 | } | 193 | } |