aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 17:51:11 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:13:01 -0400
commit36e454630473caa178bcbc4982ed6a68cf002e95 (patch)
treea80208c4d995d49025e7654447ea35476ed01e40 /arch
parent9218b1714949095bff9d9739d80f431d58e561d6 (diff)
uml: add missing __init declarations
The build started finding calls from non-init to init functions. These are just cases of init functions not being properly marked, so this patch fixes that. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/kernel/mem.c2
-rw-r--r--arch/um/os-Linux/main.c2
-rw-r--r--arch/um/os-Linux/mem.c9
-rw-r--r--arch/um/os-Linux/process.c5
-rw-r--r--arch/um/os-Linux/start_up.c4
5 files changed, 12 insertions, 10 deletions
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 5e93bbf6e482..72ff85693a39 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -216,7 +216,7 @@ static void __init fixaddr_user_init( void)
216#endif 216#endif
217} 217}
218 218
219void paging_init(void) 219void __init paging_init(void)
220{ 220{
221 unsigned long zones_size[MAX_NR_ZONES], vaddr; 221 unsigned long zones_size[MAX_NR_ZONES], vaddr;
222 int i; 222 int i;
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 4b6e122ff17b..ea9a23696f36 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -120,7 +120,7 @@ extern int uml_exitcode;
120 120
121extern void scan_elf_aux( char **envp); 121extern void scan_elf_aux( char **envp);
122 122
123int main(int argc, char **argv, char **envp) 123int __init main(int argc, char **argv, char **envp)
124{ 124{
125 char **new_argv; 125 char **new_argv;
126 int ret, i, err; 126 int ret, i, err;
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c
index dcaca0e190de..77d16023c286 100644
--- a/arch/um/os-Linux/mem.c
+++ b/arch/um/os-Linux/mem.c
@@ -164,7 +164,8 @@ found:
164 * (file: kernel/tt/ptproxy/proxy.c, proc: start_debugger). 164 * (file: kernel/tt/ptproxy/proxy.c, proc: start_debugger).
165 * So it isn't 'static' yet. 165 * So it isn't 'static' yet.
166 */ 166 */
167int make_tempfile(const char *template, char **out_tempname, int do_unlink) 167int __init make_tempfile(const char *template, char **out_tempname,
168 int do_unlink)
168{ 169{
169 char *tempname; 170 char *tempname;
170 int fd; 171 int fd;
@@ -205,7 +206,7 @@ out:
205 * This proc is used in start_up.c 206 * This proc is used in start_up.c
206 * So it isn't 'static'. 207 * So it isn't 'static'.
207 */ 208 */
208int create_tmp_file(unsigned long long len) 209int __init create_tmp_file(unsigned long long len)
209{ 210{
210 int fd, err; 211 int fd, err;
211 char zero; 212 char zero;
@@ -241,7 +242,7 @@ int create_tmp_file(unsigned long long len)
241 return fd; 242 return fd;
242} 243}
243 244
244int create_mem_file(unsigned long long len) 245int __init create_mem_file(unsigned long long len)
245{ 246{
246 int err, fd; 247 int err, fd;
247 248
@@ -256,7 +257,7 @@ int create_mem_file(unsigned long long len)
256} 257}
257 258
258 259
259void check_tmpexec(void) 260void __init check_tmpexec(void)
260{ 261{
261 void *addr; 262 void *addr;
262 int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE); 263 int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE);
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c
index 697828220af2..2babea30345e 100644
--- a/arch/um/os-Linux/process.c
+++ b/arch/um/os-Linux/process.c
@@ -21,6 +21,7 @@
21#include "skas_ptrace.h" 21#include "skas_ptrace.h"
22#include "kern_constants.h" 22#include "kern_constants.h"
23#include "uml-config.h" 23#include "uml-config.h"
24#include "init.h"
24 25
25#define ARBITRARY_ADDR -1 26#define ARBITRARY_ADDR -1
26#define FAILURE_PID -1 27#define FAILURE_PID -1
@@ -192,7 +193,7 @@ int os_unmap_memory(void *addr, int len)
192#define MADV_REMOVE KERNEL_MADV_REMOVE 193#define MADV_REMOVE KERNEL_MADV_REMOVE
193#endif 194#endif
194 195
195int os_drop_memory(void *addr, int length) 196int __init os_drop_memory(void *addr, int length)
196{ 197{
197 int err; 198 int err;
198 199
@@ -202,7 +203,7 @@ int os_drop_memory(void *addr, int length)
202 return err; 203 return err;
203} 204}
204 205
205int can_drop_memory(void) 206int __init can_drop_memory(void)
206{ 207{
207 void *addr; 208 void *addr;
208 int fd, ok = 0; 209 int fd, ok = 0;
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index 3380a13986ef..79471f85eb89 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -329,7 +329,7 @@ static void __init check_ptrace(void)
329 329
330extern void check_tmpexec(void); 330extern void check_tmpexec(void);
331 331
332static void check_coredump_limit(void) 332static void __init check_coredump_limit(void)
333{ 333{
334 struct rlimit lim; 334 struct rlimit lim;
335 int err = getrlimit(RLIMIT_CORE, &lim); 335 int err = getrlimit(RLIMIT_CORE, &lim);
@@ -350,7 +350,7 @@ static void check_coredump_limit(void)
350 else printf("%lu\n", lim.rlim_max); 350 else printf("%lu\n", lim.rlim_max);
351} 351}
352 352
353void os_early_checks(void) 353void __init os_early_checks(void)
354{ 354{
355 /* Print out the core dump limits early */ 355 /* Print out the core dump limits early */
356 check_coredump_limit(); 356 check_coredump_limit();