kernel/sched/cputime.c:256:19: warning: unused function 'account_other_time'

From: kernel test robot
Date: Fri May 28 2021 - 23:23:02 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6799d4f2da496cab9b3fd26283a8ce3639b1a88d
commit: 198688edbf77c6fc0e65f5d062f810d83d090166 MIPS: Fix inline asm input/output type mismatch in checksum.h used with Clang
date: 4 months ago
config: mips-randconfig-r016-20210529 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bc6799f2f79f0ae87e9f1ebf9d25ba799fbd25a9)
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=198688edbf77c6fc0e65f5d062f810d83d090166
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 198688edbf77c6fc0e65f5d062f810d83d090166
# 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/cputime.c:256:19: warning: unused function 'account_other_time'
static inline u64 account_other_time(u64 max)
^
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 bc6799f2f79f0ae87e9f1ebf9d25ba799fbd25a9)
Target: mips64el-unknown-linux-gnuabi64
Thread model: posix
InstalledDir: /opt/cross/clang-bc6799f2f7/bin
clang-13: note: diagnostic msg:
Makefile arch include kernel scripts source usr


vim +/account_other_time +256 kernel/sched/cputime.c

73fbec604432e1 Frederic Weisbecker 2012-06-16 252
57430218317e5b Rik van Riel 2016-07-13 253 /*
57430218317e5b Rik van Riel 2016-07-13 254 * Account how much elapsed time was spent in steal, irq, or softirq time.
57430218317e5b Rik van Riel 2016-07-13 255 */
2b1f967d80e8e5 Frederic Weisbecker 2017-01-31 @256 static inline u64 account_other_time(u64 max)
57430218317e5b Rik van Riel 2016-07-13 257 {
2b1f967d80e8e5 Frederic Weisbecker 2017-01-31 258 u64 accounted;
57430218317e5b Rik van Riel 2016-07-13 259
2c11dba00a3900 Frederic Weisbecker 2017-11-06 260 lockdep_assert_irqs_disabled();
2810f611f90811 Frederic Weisbecker 2016-09-26 261
57430218317e5b Rik van Riel 2016-07-13 262 accounted = steal_account_process_time(max);
57430218317e5b Rik van Riel 2016-07-13 263
57430218317e5b Rik van Riel 2016-07-13 264 if (accounted < max)
a499a5a14dbd1d Frederic Weisbecker 2017-01-31 265 accounted += irqtime_tick_accounted(max - accounted);
57430218317e5b Rik van Riel 2016-07-13 266
57430218317e5b Rik van Riel 2016-07-13 267 return accounted;
57430218317e5b Rik van Riel 2016-07-13 268 }
57430218317e5b Rik van Riel 2016-07-13 269

:::::: The code at line 256 was first introduced by commit
:::::: 2b1f967d80e8e5d7361f0e1654c842869570f573 sched/cputime: Complete nsec conversion of tick based accounting

:::::: TO: Frederic Weisbecker <fweisbec@xxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip