Add prototype declaration to header file include/linux/kernel.h because
it is used by more than one file.

This also eliminates the following warning in kernel/panic.c:
kernel/panic.c:55:13: warning: no previous prototype for ‘panic_smp_self_stop’ 
[-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.khe...@gmail.com>
Reviewed-by: Josh Triplett <j...@joshtriplett.org>
---
 arch/tile/kernel/smp.c |    1 +
 include/linux/kernel.h |    2 ++
 kernel/panic.c         |    1 +
 3 files changed, 4 insertions(+)

diff --git a/arch/tile/kernel/smp.c b/arch/tile/kernel/smp.c
index 01e8ab2..8b645fd 100644
--- a/arch/tile/kernel/smp.c
+++ b/arch/tile/kernel/smp.c
@@ -19,6 +19,7 @@
 #include <linux/io.h>
 #include <linux/irq.h>
 #include <linux/module.h>
+#include <linux/kernel.h>
 #include <asm/cacheflush.h>
 #include <asm/homecache.h>
 
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 196d1ea..c7cee7d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -154,6 +154,8 @@ struct completion;
 struct pt_regs;
 struct user;
 
+void __weak panic_smp_self_stop(void);
+
 #ifdef CONFIG_PREEMPT_VOLUNTARY
 extern int _cond_resched(void);
 # define might_resched() _cond_resched()
diff --git a/kernel/panic.c b/kernel/panic.c
index 6d63003..14e08c2 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -23,6 +23,7 @@
 #include <linux/sysrq.h>
 #include <linux/init.h>
 #include <linux/nmi.h>
+#include <linux/kernel.h>
 
 #define PANIC_TIMER_STEP 100
 #define PANIC_BLINK_SPD 18
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to