diff options
author | Paul Walmsley <paul.walmsley@sifive.com> | 2019-10-17 18:21:28 -0400 |
---|---|---|
committer | Paul Walmsley <paul.walmsley@sifive.com> | 2019-10-28 03:46:01 -0400 |
commit | 5ed881bc3afc40d7a23c2211ead1aeb4980dda20 (patch) | |
tree | a345d186ac71e4dcd5b2e5904026fd00e8946dbd | |
parent | bf6df5dd25b74400424f3ff5a61edad2fd6904e6 (diff) |
riscv: add missing header file includes
sparse identifies several missing prototypes caused by missing
preprocessor include directives:
arch/riscv/kernel/cpufeature.c:16:6: warning: symbol 'has_fpu' was not declared. Should it be static?
arch/riscv/kernel/process.c:26:6: warning: symbol 'arch_cpu_idle' was not declared. Should it be static?
arch/riscv/kernel/reset.c:15:6: warning: symbol 'pm_power_off' was not declared. Should it be static?
arch/riscv/kernel/syscall_table.c:15:6: warning: symbol 'sys_call_table' was not declared. Should it be static?
arch/riscv/kernel/traps.c:149:13: warning: symbol 'trap_init' was not declared. Should it be static?
arch/riscv/kernel/vdso.c:54:5: warning: symbol 'arch_setup_additional_pages' was not declared. Should it be static?
arch/riscv/kernel/smp.c:64:6: warning: symbol 'arch_match_cpu_phys_id' was not declared. Should it be static?
arch/riscv/kernel/module-sections.c:89:5: warning: symbol 'module_frob_arch_sections' was not declared. Should it be static?
arch/riscv/mm/context.c:42:6: warning: symbol 'switch_mm' was not declared. Should it be static?
Fix by including the appropriate header files in the appropriate
source files.
This patch should have no functional impact.
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | arch/riscv/include/asm/irq.h | 3 | ||||
-rw-r--r-- | arch/riscv/include/asm/switch_to.h | 1 | ||||
-rw-r--r-- | arch/riscv/kernel/cpufeature.c | 1 | ||||
-rw-r--r-- | arch/riscv/kernel/module-sections.c | 1 | ||||
-rw-r--r-- | arch/riscv/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/riscv/kernel/reset.c | 1 | ||||
-rw-r--r-- | arch/riscv/kernel/smp.c | 2 | ||||
-rw-r--r-- | arch/riscv/kernel/smpboot.c | 1 | ||||
-rw-r--r-- | arch/riscv/kernel/syscall_table.c | 1 | ||||
-rw-r--r-- | arch/riscv/kernel/time.c | 1 | ||||
-rw-r--r-- | arch/riscv/kernel/traps.c | 1 | ||||
-rw-r--r-- | arch/riscv/kernel/vdso.c | 1 | ||||
-rw-r--r-- | arch/riscv/mm/context.c | 1 |
13 files changed, 17 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/irq.h b/arch/riscv/include/asm/irq.h index 75576424c0f7..6e1b0e0325eb 100644 --- a/arch/riscv/include/asm/irq.h +++ b/arch/riscv/include/asm/irq.h | |||
@@ -7,6 +7,9 @@ | |||
7 | #ifndef _ASM_RISCV_IRQ_H | 7 | #ifndef _ASM_RISCV_IRQ_H |
8 | #define _ASM_RISCV_IRQ_H | 8 | #define _ASM_RISCV_IRQ_H |
9 | 9 | ||
10 | #include <linux/interrupt.h> | ||
11 | #include <linux/linkage.h> | ||
12 | |||
10 | #define NR_IRQS 0 | 13 | #define NR_IRQS 0 |
11 | 14 | ||
12 | void riscv_timer_interrupt(void); | 15 | void riscv_timer_interrupt(void); |
diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h index f0227bdce0f0..ee4f0ac62c9d 100644 --- a/arch/riscv/include/asm/switch_to.h +++ b/arch/riscv/include/asm/switch_to.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #ifndef _ASM_RISCV_SWITCH_TO_H | 6 | #ifndef _ASM_RISCV_SWITCH_TO_H |
7 | #define _ASM_RISCV_SWITCH_TO_H | 7 | #define _ASM_RISCV_SWITCH_TO_H |
8 | 8 | ||
9 | #include <linux/sched/task_stack.h> | ||
9 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
10 | #include <asm/ptrace.h> | 11 | #include <asm/ptrace.h> |
11 | #include <asm/csr.h> | 12 | #include <asm/csr.h> |
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index b1ade9a49347..a5ad00043104 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
11 | #include <asm/hwcap.h> | 11 | #include <asm/hwcap.h> |
12 | #include <asm/smp.h> | 12 | #include <asm/smp.h> |
13 | #include <asm/switch_to.h> | ||
13 | 14 | ||
14 | unsigned long elf_hwcap __read_mostly; | 15 | unsigned long elf_hwcap __read_mostly; |
15 | #ifdef CONFIG_FPU | 16 | #ifdef CONFIG_FPU |
diff --git a/arch/riscv/kernel/module-sections.c b/arch/riscv/kernel/module-sections.c index c9ae48333114..e264e59e596e 100644 --- a/arch/riscv/kernel/module-sections.c +++ b/arch/riscv/kernel/module-sections.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/elf.h> | 8 | #include <linux/elf.h> |
9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/moduleloader.h> | ||
11 | 12 | ||
12 | unsigned long module_emit_got_entry(struct module *mod, unsigned long val) | 13 | unsigned long module_emit_got_entry(struct module *mod, unsigned long val) |
13 | { | 14 | { |
diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c index fb3a082362eb..85e3c39bb60b 100644 --- a/arch/riscv/kernel/process.c +++ b/arch/riscv/kernel/process.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) 2017 SiFive | 7 | * Copyright (C) 2017 SiFive |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/cpu.h> | ||
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
12 | #include <linux/sched/task_stack.h> | 13 | #include <linux/sched/task_stack.h> |
@@ -19,6 +20,7 @@ | |||
19 | #include <asm/csr.h> | 20 | #include <asm/csr.h> |
20 | #include <asm/string.h> | 21 | #include <asm/string.h> |
21 | #include <asm/switch_to.h> | 22 | #include <asm/switch_to.h> |
23 | #include <asm/thread_info.h> | ||
22 | 24 | ||
23 | extern asmlinkage void ret_from_fork(void); | 25 | extern asmlinkage void ret_from_fork(void); |
24 | extern asmlinkage void ret_from_kernel_thread(void); | 26 | extern asmlinkage void ret_from_kernel_thread(void); |
diff --git a/arch/riscv/kernel/reset.c b/arch/riscv/kernel/reset.c index d0fe623bfb8f..aa56bb135ec4 100644 --- a/arch/riscv/kernel/reset.c +++ b/arch/riscv/kernel/reset.c | |||
@@ -4,6 +4,7 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/reboot.h> | 6 | #include <linux/reboot.h> |
7 | #include <linux/pm.h> | ||
7 | #include <asm/sbi.h> | 8 | #include <asm/sbi.h> |
8 | 9 | ||
9 | static void default_power_off(void) | 10 | static void default_power_off(void) |
diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c index b18cd6c8e8fb..5c9ec78422c2 100644 --- a/arch/riscv/kernel/smp.c +++ b/arch/riscv/kernel/smp.c | |||
@@ -8,7 +8,9 @@ | |||
8 | * Copyright (C) 2017 SiFive | 8 | * Copyright (C) 2017 SiFive |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/cpu.h> | ||
11 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/profile.h> | ||
12 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
13 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
14 | #include <linux/seq_file.h> | 16 | #include <linux/seq_file.h> |
diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 59fa59e013d4..ec0be2f6a2e8 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/tlbflush.h> | 29 | #include <asm/tlbflush.h> |
30 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
31 | #include <asm/sbi.h> | 31 | #include <asm/sbi.h> |
32 | #include <asm/smp.h> | ||
32 | 33 | ||
33 | #include "head.h" | 34 | #include "head.h" |
34 | 35 | ||
diff --git a/arch/riscv/kernel/syscall_table.c b/arch/riscv/kernel/syscall_table.c index e5dd52d8f633..f1ead9df96ca 100644 --- a/arch/riscv/kernel/syscall_table.c +++ b/arch/riscv/kernel/syscall_table.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/syscalls.h> | 8 | #include <linux/syscalls.h> |
9 | #include <asm-generic/syscalls.h> | 9 | #include <asm-generic/syscalls.h> |
10 | #include <asm/vdso.h> | 10 | #include <asm/vdso.h> |
11 | #include <asm/syscall.h> | ||
11 | 12 | ||
12 | #undef __SYSCALL | 13 | #undef __SYSCALL |
13 | #define __SYSCALL(nr, call) [nr] = (call), | 14 | #define __SYSCALL(nr, call) [nr] = (call), |
diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c index 9dd1f2e64db1..6a53c02e9c73 100644 --- a/arch/riscv/kernel/time.c +++ b/arch/riscv/kernel/time.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/clocksource.h> | 7 | #include <linux/clocksource.h> |
8 | #include <linux/delay.h> | 8 | #include <linux/delay.h> |
9 | #include <asm/sbi.h> | 9 | #include <asm/sbi.h> |
10 | #include <asm/processor.h> | ||
10 | 11 | ||
11 | unsigned long riscv_timebase; | 12 | unsigned long riscv_timebase; |
12 | EXPORT_SYMBOL_GPL(riscv_timebase); | 13 | EXPORT_SYMBOL_GPL(riscv_timebase); |
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 10a17e545f43..0b6e271efc43 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * Copyright (C) 2012 Regents of the University of California | 3 | * Copyright (C) 2012 Regents of the University of California |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/cpu.h> | ||
6 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
7 | #include <linux/init.h> | 8 | #include <linux/init.h> |
8 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c index e24fccab8185..484d95a70907 100644 --- a/arch/riscv/kernel/vdso.c +++ b/arch/riscv/kernel/vdso.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (C) 2015 Regents of the University of California | 6 | * Copyright (C) 2015 Regents of the University of California |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/elf.h> | ||
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
10 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
11 | #include <linux/binfmts.h> | 12 | #include <linux/binfmts.h> |
diff --git a/arch/riscv/mm/context.c b/arch/riscv/mm/context.c index beeb5d7f92ea..ca66d44156b6 100644 --- a/arch/riscv/mm/context.c +++ b/arch/riscv/mm/context.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/mm.h> | 7 | #include <linux/mm.h> |
8 | #include <asm/tlbflush.h> | 8 | #include <asm/tlbflush.h> |
9 | #include <asm/cacheflush.h> | 9 | #include <asm/cacheflush.h> |
10 | #include <asm/mmu_context.h> | ||
10 | 11 | ||
11 | /* | 12 | /* |
12 | * When necessary, performs a deferred icache flush for the given MM context, | 13 | * When necessary, performs a deferred icache flush for the given MM context, |