[peterz-queue:sched/wchan 6/7] kernel/sched/core.c:1966:22: error: static declaration of '__get_wchan' follows non-static declaration

From: kernel test robot
Date: Thu Oct 07 2021 - 06:22:47 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/wchan
head: 48f17ab32afc56a67359efc5b8889cb8cb42ec80
commit: ad0e08bcd10f58d31e78e16d817bfc466e13ac66 [6/7] arch: __get_wchan || STACKTRACE_SUPPORT
config: hexagon-randconfig-r045-20211007 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 58b68e70ebf6308f982426a2618782f473218eed)
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=ad0e08bcd10f58d31e78e16d817bfc466e13ac66
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 ad0e08bcd10f58d31e78e16d817bfc466e13ac66
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> kernel/sched/core.c:1966:22: error: static declaration of '__get_wchan' follows non-static declaration
static unsigned long __get_wchan(struct task_struct *p)
^
arch/hexagon/include/asm/processor.h:67:22: note: previous declaration is here
extern unsigned long __get_wchan(struct task_struct *p);
^
kernel/sched/core.c:3450:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes]
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
kernel/sched/core.c:3450:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
static
1 warning and 1 error generated.


vim +/__get_wchan +1966 kernel/sched/core.c

1964
1965 #ifdef CONFIG_STACKTRACE
> 1966 static unsigned long __get_wchan(struct task_struct *p)
1967 {
1968 unsigned long entry = 0;
1969
1970 stack_trace_save_tsk(p, &entry, 1, 0);
1971
1972 return entry;
1973 }
1974 #endif
1975

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

Attachment: .config.gz
Description: application/gzip