From: sukadev@us.ibm.com
To: Andrew Morton <akpm@osdl.org>
Cc: Pavel Emelianov <xemul@openvz.org>,
Containers <containers@lists.osdl.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] Fix warning in kernel/pid.c
Date: Thu, 28 Feb 2008 10:12:45 -0800 [thread overview]
Message-ID: <20080228181245.GA26319@us.ibm.com> (raw)
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject: [PATCH]: Fix compile warning in kernel/pid.c
We get a warning in kernel/pid.c due to the deprecated find_task_by_pid().
Make the function inline in sched.h to avoid the warning.
Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
---
include/linux/sched.h | 5 ++++-
kernel/pid.c | 6 ------
2 files changed, 4 insertions(+), 7 deletions(-)
Index: linux-2.6-25-rc2-mm1/include/linux/sched.h
===================================================================
--- linux-2.6-25-rc2-mm1.orig/include/linux/sched.h 2008-02-27 16:07:52.000000000 -0800
+++ linux-2.6-25-rc2-mm1/include/linux/sched.h 2008-02-27 16:29:31.000000000 -0800
@@ -1632,7 +1632,10 @@ extern struct pid_namespace init_pid_ns;
extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
struct pid_namespace *ns);
-extern struct task_struct *find_task_by_pid(pid_t nr) __deprecated;
+static inline struct task_struct *__deprecated find_task_by_pid(pid_t nr)
+{
+ return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns);
+}
extern struct task_struct *find_task_by_vpid(pid_t nr);
extern struct task_struct *find_task_by_pid_ns(pid_t nr,
struct pid_namespace *ns);
Index: linux-2.6-25-rc2-mm1/kernel/pid.c
===================================================================
--- linux-2.6-25-rc2-mm1.orig/kernel/pid.c 2008-02-27 15:18:22.000000000 -0800
+++ linux-2.6-25-rc2-mm1/kernel/pid.c 2008-02-27 16:29:31.000000000 -0800
@@ -380,12 +380,6 @@ struct task_struct *find_task_by_pid_typ
EXPORT_SYMBOL(find_task_by_pid_type_ns);
-struct task_struct *find_task_by_pid(pid_t nr)
-{
- return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns);
-}
-EXPORT_SYMBOL(find_task_by_pid);
-
struct task_struct *find_task_by_vpid(pid_t vnr)
{
return find_task_by_pid_type_ns(PIDTYPE_PID, vnr,
reply other threads:[~2008-02-28 18:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080228181245.GA26319@us.ibm.com \
--to=sukadev@us.ibm.com \
--cc=akpm@osdl.org \
--cc=containers@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xemul@openvz.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.