Commit 28028313134e9f11e49f74a4beaa47c91e5ebf06

Authored by Nadia Derbey
Committed by Linus Torvalds
1 parent ce621f5ba5

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

... ... @@ -695,11 +695,6 @@
695 695 return out;
696 696 }
697 697  
698   -int ipc_buildid(struct ipc_ids* ids, int id, int seq)
699   -{
700   - return SEQ_MULTIPLIER*seq + id;
701   -}
702   -
703 698 #ifdef __ARCH_WANT_IPC_PARSE_VERSION
704 699  
705 700  
... ... @@ -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)