From: Nadia.Derbey@bull.net
To: linux-kernel@vger.kernel.org
Cc: matthltc@us.ibm.com, Nadia Derbey <Nadia.Derbey@bull.net>
Subject: [RFC][PATCH 6/6] Inlining ipc_buildid()
Date: Fri, 31 Aug 2007 13:24:51 +0200 [thread overview]
Message-ID: <20070831112615.480609000@bull.net> (raw)
In-Reply-To: <20070831112445.976429000@bull.net>
[-- Attachment #1: ipc_buildid.patch --]
[-- Type: text/plain, Size: 1724 bytes --]
[PATCH 06/06]
This is a trivial patch that changes the ipc_buildid() routine into a static
inline.
Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>
---
ipc/util.c | 5 -----
ipc/util.h | 6 +++++-
2 files changed, 5 insertions(+), 6 deletions(-)
Index: linux-2.6.23-rc2/ipc/util.h
===================================================================
--- linux-2.6.23-rc2.orig/ipc/util.h 2007-08-31 12:53:30.000000000 +0200
+++ linux-2.6.23-rc2/ipc/util.h 2007-08-31 12:58:14.000000000 +0200
@@ -106,7 +106,6 @@ void ipc_rcu_getref(void *ptr);
void ipc_rcu_putref(void *ptr);
struct kern_ipc_perm *ipc_lock(struct ipc_ids *, int);
-int ipc_buildid(struct ipc_ids* ids, int id, int seq);
void kernel_to_ipc64_perm(struct kern_ipc_perm *in, struct ipc64_perm *out);
void ipc64_perm_to_ipc_perm(struct ipc64_perm *in, struct ipc_perm *out);
@@ -126,6 +125,11 @@ extern int ipcget_new(struct ipc_namespa
extern int ipcget_public(struct ipc_namespace *, struct ipc_ids *,
struct ipc_ops *, struct ipc_params *);
+static inline int ipc_buildid(struct ipc_ids *ids, int id, int seq)
+{
+ return SEQ_MULTIPLIER * seq + id;
+}
+
static inline int ipc_checkid(struct ipc_ids *ids, struct kern_ipc_perm *ipcp,
int uid)
{
Index: linux-2.6.23-rc2/ipc/util.c
===================================================================
--- linux-2.6.23-rc2.orig/ipc/util.c 2007-08-31 12:54:39.000000000 +0200
+++ linux-2.6.23-rc2/ipc/util.c 2007-08-31 12:58:40.000000000 +0200
@@ -695,11 +695,6 @@ struct kern_ipc_perm *ipc_lock(struct ip
return out;
}
-int ipc_buildid(struct ipc_ids* ids, int id, int seq)
-{
- return SEQ_MULTIPLIER*seq + id;
-}
-
#ifdef __ARCH_WANT_IPC_PARSE_VERSION
--
prev parent reply other threads:[~2007-08-31 11:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-31 11:24 [RFC][PATCH 0/6] An IPC implementation base on Linux IDRs Nadia.Derbey
2007-08-31 11:24 ` [RFC][PATCH 1/6] Storing ipcs into IDRs Nadia.Derbey
2007-09-01 22:12 ` Andi Kleen
2007-09-03 10:16 ` Nadia Derbey
2007-09-06 9:33 ` Nadia Derbey
2007-09-07 15:18 ` Nadia Derbey
2007-09-10 20:08 ` Andrew Morton
2007-08-31 11:24 ` [RFC][PATCH 2/6] Unifying the syscalls code Nadia.Derbey
2007-08-31 11:24 ` [RFC][PATCH 3/6] Removing the ipc_get() routine Nadia.Derbey
2007-08-31 11:24 ` [RFC][PATCH 4/6] Integrating ipc_checkid() into ipc_lock() Nadia.Derbey
2007-08-31 11:24 ` [RFC][PATCH 5/6] Introducing the ipcid_to_idx macro Nadia.Derbey
2007-08-31 11:24 ` Nadia.Derbey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070831112615.480609000@bull.net \
--to=nadia.derbey@bull.net \
--cc=linux-kernel@vger.kernel.org \
--cc=matthltc@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®