From: Sukadev Bhattiprolu 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 Cc: Pavel Emelianov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton --- include/linux/sched.h | 5 ++++- kernel/pid.c | 6 ------ 2 files changed, 4 insertions(+), 7 deletions(-) diff -puN include/linux/sched.h~deprecate-find_task_by_pid-warning-fix include/linux/sched.h --- a/include/linux/sched.h~deprecate-find_task_by_pid-warning-fix +++ a/include/linux/sched.h @@ -1633,7 +1633,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); diff -puN kernel/pid.c~deprecate-find_task_by_pid-warning-fix kernel/pid.c --- a/kernel/pid.c~deprecate-find_task_by_pid-warning-fix +++ a/kernel/pid.c @@ -382,12 +382,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, _