[peterz-queue:sched/wchan 7/7] arch/mips/kernel/stacktrace.c:69:6: warning: no previous prototype for '__save_stack_trace_tsk'

From: kernel test robot
Date: Thu Oct 07 2021 - 04:23:40 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/wchan
head: 48f17ab32afc56a67359efc5b8889cb8cb42ec80
commit: 48f17ab32afc56a67359efc5b8889cb8cb42ec80 [7/7] arch: Fix STACKTRACE_SUPPORT
config: mips-loongson1b_defconfig (attached as .config)
compiler: mipsel-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=48f17ab32afc56a67359efc5b8889cb8cb42ec80
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/wchan
git checkout 48f17ab32afc56a67359efc5b8889cb8cb42ec80
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> arch/mips/kernel/stacktrace.c:69:6: warning: no previous prototype for '__save_stack_trace_tsk' [-Wmissing-prototypes]
69 | void __save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace, bool savesched)
| ^~~~~~~~~~~~~~~~~~~~~~


vim +/__save_stack_trace_tsk +69 arch/mips/kernel/stacktrace.c

68
> 69 void __save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace, bool savesched)
70 {
71 struct pt_regs dummyregs;
72 struct pt_regs *regs = &dummyregs;
73
74 WARN_ON(trace->nr_entries || !trace->max_entries);
75
76 if (tsk != current) {
77 regs->regs[29] = tsk->thread.reg29;
78 regs->regs[31] = 0;
79 regs->cp0_epc = tsk->thread.reg31;
80 } else
81 prepare_frametrace(regs);
82 save_context_stack(trace, tsk, regs, savesched);
83 }
84

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip