[peterz-queue:locking/core 13/14] kernel/locking/mutex.c:143:35: warning: unused function '__mutex_trylock_or_owner'

From: kernel test robot
Date: Sat Jul 03 2021 - 18:11:02 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
head: 9df16fbedc1deaf5b63a1b025776bd8c78a9686d
commit: f9967fb3a28f87f8b8b6ae286dbb06902525717d [13/14] locking/mutex: Introduce __mutex_trylock_or_handoff()
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/peterz/queue.git/commit/?id=f9967fb3a28f87f8b8b6ae286dbb06902525717d
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/core
git checkout f9967fb3a28f87f8b8b6ae286dbb06902525717d
# 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/

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/locking/mutex.c:143:35: warning: unused function '__mutex_trylock_or_owner'
static inline struct task_struct mutex
^
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-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 net scripts security sound source usr virt


vim +/__mutex_trylock_or_owner +143 kernel/locking/mutex.c

139
140 /*
141 * Trylock variant that returns the owning task on failure.
142 */
> 143 static inline struct task_struct *__mutex_trylock_or_owner(struct mutex *lock)
144 {
145 return __mutex_trylock_common(lock, false);
146 }
147

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

Attachment: .config.gz
Description: application/gzip