Storing ipcs into IDRs

This patch converts casts of struct kern_ipc_perm to
   . struct msg_queue
   . struct sem_array
   . struct shmid_kernel
into the equivalent container_of() macro. It improves code maintenance
because the code need not change if kern_ipc_perm is no longer at the
beginning of the containing struct.

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>
diff --git a/ipc/util.h b/ipc/util.h
index c4b0a98..2a03d8c 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -61,8 +61,8 @@
  */
 struct ipc_ops {
 	int (*getnew) (struct ipc_namespace *, struct ipc_params *);
-	int (*associate) (void *, int);
-	int (*more_checks) (void *, struct ipc_params *);
+	int (*associate) (struct kern_ipc_perm *, int);
+	int (*more_checks) (struct kern_ipc_perm *, struct ipc_params *);
 };
 
 struct seq_file;