[PATCH][request for stable 3.14 inclusion] fix compile warning messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

while compiling stable 3.14, I saw lots of warning message like:

include/linux/sched.h:1698: warning: ‘pid_alive’ declared inline after being called
include/linux/sched.h:1698: warning: previous declaration of ‘pid_alive’ was here

This error is fixed in upstream by

commit 80e0b6e8a001361316a2d62b748fe677ec46b860
sched: declare pid_alive as inline

and also backport into stable 3.12. I wish you could backport it
into stable 3.14.


From: Richard Guy Briggs <rgb@xxxxxxxxxx>

commit 80e0b6e8a001361316a2d62b748fe677ec46b860 upstream.

We accidentally declared pid_alive without any extern/inline connotation.
Some platforms were fine with this, some like ia64 and mips were very angry.
If the function is inline, the prototype should be inline!

on ia64:
include/linux/sched.h:1718: warning: 'pid_alive' declared inline after
being called

Signed-off-by: Richard Guy Briggs <rgb@xxxxxxxxxx>
Signed-off-by: Eric Paris <eparis@xxxxxxxxxx>
Signed-off-by: hujianyang <hujianyang@xxxxxxxxxx>
---
 include/linux/sched.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 218b058..91fe6a3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1695,7 +1695,7 @@ static inline pid_t task_tgid_vnr(struct task_struct *tsk)
 }


-static int pid_alive(const struct task_struct *p);
+static inline int pid_alive(const struct task_struct *p);
 static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns)
 {
 	pid_t pid = 0;
-- 
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]