Commit a4b4382f authored by Tiwei Bie's avatar Tiwei Bie Committed by Richard Weinberger
Browse files

um: Move declarations to proper headers



This will address below -Wmissing-prototypes warnings:

arch/um/kernel/initrd.c:18:12: warning: no previous prototype for ‘read_initrd’ [-Wmissing-prototypes]
arch/um/kernel/um_arch.c:408:19: warning: no previous prototype for ‘read_initrd’ [-Wmissing-prototypes]
arch/um/os-Linux/start_up.c:301:12: warning: no previous prototype for ‘parse_iomem’ [-Wmissing-prototypes]
arch/x86/um/ptrace_32.c:15:6: warning: no previous prototype for ‘arch_switch_to’ [-Wmissing-prototypes]
arch/x86/um/ptrace_32.c:101:5: warning: no previous prototype for ‘poke_user’ [-Wmissing-prototypes]
arch/x86/um/ptrace_32.c:153:5: warning: no previous prototype for ‘peek_user’ [-Wmissing-prototypes]
arch/x86/um/ptrace_64.c:111:5: warning: no previous prototype for ‘poke_user’ [-Wmissing-prototypes]
arch/x86/um/ptrace_64.c:171:5: warning: no previous prototype for ‘peek_user’ [-Wmissing-prototypes]
arch/x86/um/syscalls_64.c:48:6: warning: no previous prototype for ‘arch_switch_to’ [-Wmissing-prototypes]
arch/x86/um/tls_32.c:184:5: warning: no previous prototype for ‘arch_switch_tls’ [-Wmissing-prototypes]

Signed-off-by: default avatarTiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 9ffc6724
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ extern long subarch_ptrace(struct task_struct *child, long request,
extern unsigned long getreg(struct task_struct *child, int regno);
extern int putreg(struct task_struct *child, int regno, unsigned long value);

extern int poke_user(struct task_struct *child, long addr, long data);
extern int peek_user(struct task_struct *child, long addr, long data);

extern int arch_set_tls(struct task_struct *new, unsigned long tls);
extern void clear_flushed_tls(struct task_struct *task);
extern int syscall_trace_enter(struct pt_regs *regs);
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ extern void uml_pm_wake(void);

extern int start_uml(void);
extern void paging_init(void);
extern int parse_iomem(char *str, int *add);

extern void uml_cleanup(void);
extern void do_uml_exitcalls(void);
+1 −2
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <as-layout.h>
#include <init.h>
#include <kern.h>
#include <kern_util.h>
#include <mem_user.h>
#include <os.h>

@@ -161,8 +162,6 @@ __uml_setup("mem=", uml_mem_setup,
"	Example: mem=64M\n\n"
);

extern int __init parse_iomem(char *str, int *add);

__uml_setup("iomem=", parse_iomem,
"iomem=<name>,<file>\n"
"    Configure <file> as an IO memory region named <name>.\n\n"
+0 −2
Original line number Diff line number Diff line
@@ -74,8 +74,6 @@ static inline void set_current(struct task_struct *task)
		{ external_pid(), task });
}

extern void arch_switch_to(struct task_struct *to);

struct task_struct *__switch_to(struct task_struct *from, struct task_struct *to)
{
	to->thread.prev_sched = from;
+0 −3
Original line number Diff line number Diff line
@@ -35,9 +35,6 @@ void ptrace_disable(struct task_struct *child)
	user_disable_single_step(child);
}

extern int peek_user(struct task_struct * child, long addr, long data);
extern int poke_user(struct task_struct * child, long addr, long data);

long arch_ptrace(struct task_struct *child, long request,
		 unsigned long addr, unsigned long data)
{
Loading