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.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ipc/util.h') diff --git a/ipc/util.h b/ipc/util.h index 2a03d8cc6a01..fa7e7a07486e 100644 --- a/ipc/util.h +++ b/ipc/util.h @@ -79,6 +79,8 @@ void __init ipc_init_proc_interface(const char *path, const char *header, #define IPC_MSG_IDS 1 #define IPC_SHM_IDS 2 +#define ipcid_to_idx(id) ((id) % SEQ_MULTIPLIER) + /* must be called with ids->mutex acquired.*/ int ipc_addid(struct ipc_ids *, struct kern_ipc_perm *, int); int ipc_get_maxid(struct ipc_ids *); -- cgit v1.2.3-59-g8ed1b