[PATCH 37/58] kernel/fork.c: Add prototype for fork_init

From: Josh Triplett
Date: Mon Nov 19 2012 - 00:31:20 EST


kernel/fork.c defines an __init function fork_init, called from
init/main.c. No header file prototypes fork_init, because init/main.c
tends to directly define prototypes for init functions it calls, rather
than including appropriate headers. So, add a prototype of fork_init to
kernel/fork.c right above the definition, to satisfy gcc
(-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/fork.c:251:116: warning: no previous prototype for âfork_initâ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
---
kernel/fork.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index 8532f1a..5971176 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -250,6 +250,8 @@ EXPORT_SYMBOL_GPL(__put_task_struct);

void __init __weak arch_task_cache_init(void) { }

+void fork_init(unsigned long mempages);
+
void __init fork_init(unsigned long mempages)
{
#ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR
--
1.7.10.4

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