kernel/sched/core.c:6854:20: warning: unused function 'balance_hotplug_wait'

From: kernel test robot
Date: Sat Jul 03 2021 - 09:54:59 EST


Hi Thomas,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4b820e167bf6f410ace479d8df5b15a574000e75
commit: 1cf12e08bc4d50a76b80c42a3109c53d8794a0c9 sched/hotplug: Consolidate task migration on CPU unplug
date: 8 months ago
config: mips-randconfig-r015-20210702 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9eb613b2de3163686b1a4bd1160f15ac56a4b083)
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/torvalds/linux.git/commit/?id=1cf12e08bc4d50a76b80c42a3109c53d8794a0c9
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1cf12e08bc4d50a76b80c42a3109c53d8794a0c9
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=mips SHELL=/bin/bash kernel/locking/ kernel/sched/ kernel/time/ mm/

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:2376: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:2376: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:3746:13: warning: variable 'rq' set but not used
struct rq
^
kernel/sched/core.c:4196:20: warning: unused function 'sched_tick_stop'
static inline void sched_tick_stop(int cpu) { }
^
>> kernel/sched/core.c:6854: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: '.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/barrier.h", .line = 21, $); 0x00 ) != -1)) : $))) ) && ( (1 << 0) ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif'
clang-13: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 13.0.0 (git://gitmirror/llvm_project cb5de7c813f976dd458bd2a7f40702ba648bf650)
Target: mips-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-cb5de7c813/bin
clang-13: note: diagnostic msg:
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm scripts security sound source usr virt


vim +/balance_hotplug_wait +6854 kernel/sched/core.c

2558aacff85866 Peter Zijlstra 2020-09-11 6853
f2469a1fb43f85 Thomas Gleixner 2020-09-14 @6854 static inline void balance_hotplug_wait(void)
f2469a1fb43f85 Thomas Gleixner 2020-09-14 6855 {
f2469a1fb43f85 Thomas Gleixner 2020-09-14 6856 }
f2469a1fb43f85 Thomas Gleixner 2020-09-14 6857

:::::: The code at line 6854 was first introduced by commit
:::::: f2469a1fb43f85d243ce72638367fb6e15c33491 sched/core: Wait for tasks being pushed away on hotplug

:::::: 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