diff options
author | Tiwei Bie <tiwei.btw@antgroup.com> | 2024-03-06 18:19:23 +0800 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2024-04-22 21:58:48 +0200 |
commit | a4b4382f3e83bb4fa4a421e6cf5a5ef987658475 (patch) | |
tree | 4b8a3855c044c5494d87509a32dff0a0b2365530 /arch/um/kernel | |
parent | 9ffc6724a35c9404a99f430f3c35b0b6372390c1 (diff) | |
download | linux-stable-a4b4382f3e83bb4fa4a421e6cf5a5ef987658475.tar.gz linux-stable-a4b4382f3e83bb4fa4a421e6cf5a5ef987658475.tar.bz2 linux-stable-a4b4382f3e83bb4fa4a421e6cf5a5ef987658475.zip |
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: Tiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r-- | arch/um/kernel/physmem.c | 3 | ||||
-rw-r--r-- | arch/um/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/um/kernel/ptrace.c | 3 | ||||
-rw-r--r-- | arch/um/kernel/um_arch.h | 2 |
4 files changed, 3 insertions, 7 deletions
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 91485119ae67..fb2adfb49945 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c @@ -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" diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 4235e2ca2664..1395ff3017f0 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -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; diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index 6600a2782796..2124624b7817 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c @@ -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) { diff --git a/arch/um/kernel/um_arch.h b/arch/um/kernel/um_arch.h index 1e07fb7ee35e..46e731ab9dfc 100644 --- a/arch/um/kernel/um_arch.h +++ b/arch/um/kernel/um_arch.h @@ -11,4 +11,6 @@ extern void __init uml_dtb_init(void); static inline void uml_dtb_init(void) { } #endif +extern int __init read_initrd(void); + #endif |