lkml.org 
[lkml]   [2012]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 37/58] kernel/fork.c: Add prototype for fork_init
Date
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@joshtriplett.org>
---
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-11-19 07:21    [W:0.240 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site