From ce621f5ba52f30dd59aef4fb50276faee04ef9cf Mon Sep 17 00:00:00 2001 From: Nadia Derbey Date: Thu, 18 Oct 2007 23:40:52 -0700 Subject: ipc: introduce the ipcid_to_idx macro This is a trivial patch that changes all the (id % SEQ_MULTIPLIER) into a call to the ipcid_to_idx(id) macro. Signed-off-by: Nadia Derbey Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- ipc/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipc/util.c') diff --git a/ipc/util.c b/ipc/util.c index 9b0c4e7753af..c51c96f2e0cf 100644 --- a/ipc/util.c +++ b/ipc/util.c @@ -413,7 +413,7 @@ int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids, void ipc_rmid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp) { - int lid = ipcp->id % SEQ_MULTIPLIER; + int lid = ipcid_to_idx(ipcp->id); idr_remove(&ids->ipcs_idr, lid); @@ -672,7 +672,7 @@ void ipc64_perm_to_ipc_perm (struct ipc64_perm *in, struct ipc_perm *out) struct kern_ipc_perm *ipc_lock(struct ipc_ids *ids, int id) { struct kern_ipc_perm *out; - int lid = id % SEQ_MULTIPLIER; + int lid = ipcid_to_idx(id); rcu_read_lock(); out = idr_find(&ids->ipcs_idr, lid); -- cgit v1.2.3-70-g09d2