[tip:sched/migrate-disable 15/18] kernel/sched/core.c:2771:20: warning: unused function 'rq_has_pinned_tasks'

From: kernel test robot
Date: Mon Nov 23 2020 - 08:09:53 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/migrate-disable
head: c777d847107e80df24dae87fc9cf4b4c0bf4dfed
commit: a7c81556ec4d341dfdbf2cc478ead89d73e474a7 [15/18] sched: Fix migrate_disable() vs rt/dl balancing
config: mips-randconfig-r016-20201123 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c8c3a411c50f541ce5362bd60ee3f8fe43ac2722)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=a7c81556ec4d341dfdbf2cc478ead89d73e474a7
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip sched/migrate-disable
git checkout a7c81556ec4d341dfdbf2cc478ead89d73e474a7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):

kernel/sched/core.c:2711:6: warning: no previous prototype for function 'sched_set_stop_task'
void sched_set_stop_task(int cpu, struct task_struct
^
kernel/sched/core.c:2711: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
^
static
>> kernel/sched/core.c:2771:20: warning: unused function 'rq_has_pinned_tasks'
static inline bool rq_has_pinned_tasks(struct rq
^
kernel/sched/core.c:4559:20: warning: unused function 'sched_tick_stop'
static inline void sched_tick_stop(int cpu) { }
^
>> kernel/sched/core.c:7224:20: warning: unused function 'balance_hotplug_wait'
static inline void balance_hotplug_wait(void)
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set noat
.set push
.set arch=r4000
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $2 # __cmpxchg_asm
bne $0, ${3:z}, 2f
.set pop
move $$1, ${4:z}
.set arch=r4000
sc $$1, $1
beqz $$1, 1b
.set pop
2: .if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/cmpxchg.h", .line = 163, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
'
clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 12.0.0 (git://gitmirror/llvm_project c8c3a411c50f541ce5362bd60ee3f8fe43ac2722)
Target: mips-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-c8c3a411c5/bin
clang-12: note: diagnostic msg:
Makefile arch include kernel scripts source usr

vim +/rq_has_pinned_tasks +2771 kernel/sched/core.c

af449901b84c98c Peter Zijlstra 2020-09-17 2770
3015ef4b98f53fe Thomas Gleixner 2020-08-26 @2771 static inline bool rq_has_pinned_tasks(struct rq *rq)
3015ef4b98f53fe Thomas Gleixner 2020-08-26 2772 {
3015ef4b98f53fe Thomas Gleixner 2020-08-26 2773 return false;
3015ef4b98f53fe Thomas Gleixner 2020-08-26 2774 }
3015ef4b98f53fe Thomas Gleixner 2020-08-26 2775

:::::: The code at line 2771 was first introduced by commit
:::::: 3015ef4b98f53fe7eba4f5f82f562c0e074d213c sched/core: Make migrate disable and CPU hotplug cooperative

:::::: TO: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
:::::: CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip