Skip to content

Commit 9ffc672

Browse files
btw616richardweinberger
authored andcommitted
um: Add missing headers
This will address below -Wmissing-prototypes warnings: arch/um/kernel/mem.c:202:8: warning: no previous prototype for ‘pgd_alloc’ [-Wmissing-prototypes] arch/um/kernel/mem.c:215:7: warning: no previous prototype for ‘uml_kmalloc’ [-Wmissing-prototypes] arch/um/kernel/process.c:207:6: warning: no previous prototype for ‘arch_cpu_idle’ [-Wmissing-prototypes] arch/um/kernel/process.c:328:15: warning: no previous prototype for ‘arch_align_stack’ [-Wmissing-prototypes] arch/um/kernel/reboot.c:45:6: warning: no previous prototype for ‘machine_restart’ [-Wmissing-prototypes] arch/um/kernel/reboot.c:51:6: warning: no previous prototype for ‘machine_power_off’ [-Wmissing-prototypes] arch/um/kernel/reboot.c:57:6: warning: no previous prototype for ‘machine_halt’ [-Wmissing-prototypes] arch/um/kernel/skas/mmu.c:17:5: warning: no previous prototype for ‘init_new_context’ [-Wmissing-prototypes] arch/um/kernel/skas/mmu.c:60:6: warning: no previous prototype for ‘destroy_context’ [-Wmissing-prototypes] arch/um/kernel/skas/process.c:36:12: warning: no previous prototype for ‘start_uml’ [-Wmissing-prototypes] arch/um/kernel/time.c:807:15: warning: no previous prototype for ‘calibrate_delay_is_known’ [-Wmissing-prototypes] arch/um/kernel/tlb.c:594:6: warning: no previous prototype for ‘force_flush_all’ [-Wmissing-prototypes] arch/x86/um/bugs_32.c:22:6: warning: no previous prototype for ‘arch_check_bugs’ [-Wmissing-prototypes] arch/x86/um/bugs_32.c:44:6: warning: no previous prototype for ‘arch_examine_signal’ [-Wmissing-prototypes] arch/x86/um/bugs_64.c:9:6: warning: no previous prototype for ‘arch_check_bugs’ [-Wmissing-prototypes] arch/x86/um/bugs_64.c:13:6: warning: no previous prototype for ‘arch_examine_signal’ [-Wmissing-prototypes] arch/x86/um/elfcore.c:10:12: warning: no previous prototype for ‘elf_core_extra_phdrs’ [-Wmissing-prototypes] arch/x86/um/elfcore.c:15:5: warning: no previous prototype for ‘elf_core_write_extra_phdrs’ [-Wmissing-prototypes] arch/x86/um/elfcore.c:42:5: warning: no previous prototype for ‘elf_core_write_extra_data’ [-Wmissing-prototypes] arch/x86/um/elfcore.c:63:8: warning: no previous prototype for ‘elf_core_extra_data_size’ [-Wmissing-prototypes] arch/x86/um/fault.c:18:5: warning: no previous prototype for ‘arch_fixup’ [-Wmissing-prototypes] arch/x86/um/os-Linux/mcontext.c:7:6: warning: no previous prototype for ‘get_regs_from_mc’ [-Wmissing-prototypes] arch/x86/um/os-Linux/tls.c:22:6: warning: no previous prototype for ‘check_host_supports_tls’ [-Wmissing-prototypes] Signed-off-by: Tiwei Bie <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 179d83d commit 9ffc672

File tree

13 files changed

+15
-0
lines changed

13 files changed

+15
-0
lines changed

arch/um/kernel/mem.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
#include <linux/slab.h>
1313
#include <asm/fixmap.h>
1414
#include <asm/page.h>
15+
#include <asm/pgalloc.h>
1516
#include <as-layout.h>
1617
#include <init.h>
1718
#include <kern.h>
1819
#include <kern_util.h>
1920
#include <mem_user.h>
2021
#include <os.h>
22+
#include <um_malloc.h>
2123
#include <linux/sched/task.h>
2224

2325
#ifdef CONFIG_KASAN

arch/um/kernel/process.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/proc_fs.h>
1616
#include <linux/ptrace.h>
1717
#include <linux/random.h>
18+
#include <linux/cpu.h>
1819
#include <linux/slab.h>
1920
#include <linux/sched.h>
2021
#include <linux/sched/debug.h>
@@ -27,6 +28,7 @@
2728
#include <asm/current.h>
2829
#include <asm/mmu_context.h>
2930
#include <asm/switch_to.h>
31+
#include <asm/exec.h>
3032
#include <linux/uaccess.h>
3133
#include <as-layout.h>
3234
#include <kern_util.h>

arch/um/kernel/reboot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/spinlock.h>
1010
#include <linux/slab.h>
1111
#include <linux/oom.h>
12+
#include <linux/reboot.h>
1213
#include <kern_util.h>
1314
#include <os.h>
1415
#include <skas.h>

arch/um/kernel/skas/mmu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <asm/pgalloc.h>
1212
#include <asm/sections.h>
13+
#include <asm/mmu_context.h>
1314
#include <as-layout.h>
1415
#include <os.h>
1516
#include <skas.h>

arch/um/kernel/skas/process.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <kern.h>
1313
#include <os.h>
1414
#include <skas.h>
15+
#include <kern_util.h>
1516

1617
extern void start_kernel(void);
1718

arch/um/kernel/time.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <asm/param.h>
2020
#include <kern_util.h>
2121
#include <os.h>
22+
#include <linux/delay.h>
2223
#include <linux/time-internal.h>
2324
#include <linux/um_timetravel.h>
2425
#include <shared/init.h>

arch/um/kernel/tlb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/sched/signal.h>
99

1010
#include <asm/tlbflush.h>
11+
#include <asm/mmu_context.h>
1112
#include <as-layout.h>
1213
#include <mem_user.h>
1314
#include <os.h>

arch/x86/um/bugs_32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Licensed under the GPL
44
*/
55

6+
#include <arch.h>
67
#include <signal.h>
78
#include <kern_util.h>
89
#include <longjmp.h>

arch/x86/um/bugs_64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Licensed under the GPL
55
*/
66

7+
#include <arch.h>
78
#include <sysdep/ptrace.h>
89

910
void arch_check_bugs(void)

arch/x86/um/elfcore.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <linux/elf.h>
3+
#include <linux/elfcore.h>
34
#include <linux/coredump.h>
45
#include <linux/fs.h>
56
#include <linux/mm.h>

0 commit comments

Comments
 (0)