Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64/process.c: fix Wmissing-prototypes build warnings

Fix GCC warnings reported when building with "-Wmissing-prototypes":

arch/arm64/kernel/process.c:261:6: warning: no previous prototype for '__show_regs' [-Wmissing-prototypes]
261 | void __show_regs(struct pt_regs *regs)
| ^~~~~~~~~~~
arch/arm64/kernel/process.c:307:6: warning: no previous prototype for '__show_regs_alloc_free' [-Wmissing-prototypes]
307 | void __show_regs_alloc_free(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/process.c:365:5: warning: no previous prototype for 'arch_dup_task_struct' [-Wmissing-prototypes]
365 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
| ^~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/process.c:546:41: warning: no previous prototype for '__switch_to' [-Wmissing-prototypes]
546 | __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev,
| ^~~~~~~~~~~
arch/arm64/kernel/process.c:710:25: warning: no previous prototype for 'arm64_preempt_schedule_irq' [-Wmissing-prototypes]
710 | asmlinkage void __sched arm64_preempt_schedule_irq(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~

Link: https://lore.kernel.org/lkml/202103192250.AennsfXM-lkp@intel.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Link: https://lore.kernel.org/r/1616568899-986-1-git-send-email-maninder1.s@samsung.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Maninder Singh and committed by
Will Deacon
baa96377 7011d725

+6
+2
arch/arm64/include/asm/processor.h
··· 251 251 extern struct task_struct *cpu_switch_to(struct task_struct *prev, 252 252 struct task_struct *next); 253 253 254 + asmlinkage void arm64_preempt_schedule_irq(void); 255 + 254 256 #define task_pt_regs(p) \ 255 257 ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1) 256 258
+2
arch/arm64/include/asm/thread_info.h
··· 55 55 #define arch_setup_new_exec arch_setup_new_exec 56 56 57 57 void arch_release_task_struct(struct task_struct *tsk); 58 + int arch_dup_task_struct(struct task_struct *dst, 59 + struct task_struct *src); 58 60 59 61 #endif 60 62
+2
arch/arm64/kernel/process.c
··· 57 57 #include <asm/processor.h> 58 58 #include <asm/pointer_auth.h> 59 59 #include <asm/stacktrace.h> 60 + #include <asm/switch_to.h> 61 + #include <asm/system_misc.h> 60 62 61 63 #if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_STACKPROTECTOR_PER_TASK) 62 64 #include <linux/stackprotector.h>