fs/xfs/xfs_icache.c:286:1: warning: unused function 'xfs_inew_wait'

From: kernel test robot
Date: Wed Sep 01 2021 - 08:13:58 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9e9fb7655ed585da8f468e29221f0ba194a5f613
commit: 7fdff52623b4df9c9ae665fe8bb727978c29414e xfs: remove iter_flags parameter from xfs_inode_walk_*
date: 3 months ago
config: mips-randconfig-r026-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 510e106fa8635e7f9c51c896180b971de6309b2f)
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=7fdff52623b4df9c9ae665fe8bb727978c29414e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7fdff52623b4df9c9ae665fe8bb727978c29414e
# 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 block/ fs/xfs/

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

All warnings (new ones prefixed by >>):

>> fs/xfs/xfs_icache.c:286:1: warning: unused function 'xfs_inew_wait'
xfs_inew_wait(
^
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 = 16, $); 0x00 ) != -1)) : $))) ) && ( (1 << 0) ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif'
clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 14.0.0 (git://gitmirror/llvm_project 4b1fde8a2b681dad2ce0c082a5d6422caa06b0bc)
Target: mips64-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-4b1fde8a2b/bin
clang-14: note: diagnostic msg:
Makefile arch block drivers fs include kernel mm net nr_bisected scripts source usr


vim +/xfs_inew_wait +286 fs/xfs/xfs_icache.c

ad438c4038968e Dave Chinner 2016-05-18 284
7fdff52623b4df Darrick J. Wong 2021-05-31 285 static inline void
ae2c4ac2dd39b2 Brian Foster 2017-04-26 @286 xfs_inew_wait(
ae2c4ac2dd39b2 Brian Foster 2017-04-26 287 struct xfs_inode *ip)
ae2c4ac2dd39b2 Brian Foster 2017-04-26 288 {
ae2c4ac2dd39b2 Brian Foster 2017-04-26 289 wait_queue_head_t *wq = bit_waitqueue(&ip->i_flags, __XFS_INEW_BIT);
ae2c4ac2dd39b2 Brian Foster 2017-04-26 290 DEFINE_WAIT_BIT(wait, &ip->i_flags, __XFS_INEW_BIT);
ae2c4ac2dd39b2 Brian Foster 2017-04-26 291
ae2c4ac2dd39b2 Brian Foster 2017-04-26 292 do {
2141713616c652 Ingo Molnar 2017-03-05 293 prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
ae2c4ac2dd39b2 Brian Foster 2017-04-26 294 if (!xfs_iflags_test(ip, XFS_INEW))
ae2c4ac2dd39b2 Brian Foster 2017-04-26 295 break;
ae2c4ac2dd39b2 Brian Foster 2017-04-26 296 schedule();
ae2c4ac2dd39b2 Brian Foster 2017-04-26 297 } while (true);
2141713616c652 Ingo Molnar 2017-03-05 298 finish_wait(wq, &wait.wq_entry);
ae2c4ac2dd39b2 Brian Foster 2017-04-26 299 }
ae2c4ac2dd39b2 Brian Foster 2017-04-26 300

:::::: The code at line 286 was first introduced by commit
:::::: ae2c4ac2dd39b23a87ddb14ceddc3f2872c6aef5 xfs: update ag iterator to support wait on new inodes

:::::: TO: Brian Foster <bfoster@xxxxxxxxxx>
:::::: CC: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip