[tip:timers/core 13/13] kernel/time/posix-cpu-timers.c:1310:19: error: use of undeclared identifier 'timer'

From: kernel test robot
Date: Wed Apr 19 2023 - 15:27:09 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
head: 1bb5b68fd3aabb6b9d6b9e9bb092bb8f3c2ade62
commit: 1bb5b68fd3aabb6b9d6b9e9bb092bb8f3c2ade62 [13/13] posix-cpu-timers: Implement the missing timer_wait_running callback
config: arm-randconfig-r046-20230416 (https://download.01.org/0day-ci/archive/20230420/202304200309.F6HbUeCE-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 437b7602e4a998220871de78afcb020b9c14a661)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=1bb5b68fd3aabb6b9d6b9e9bb092bb8f3c2ade62
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip timers/core
git checkout 1bb5b68fd3aabb6b9d6b9e9bb092bb8f3c2ade62
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash kernel/time/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304200309.F6HbUeCE-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> kernel/time/posix-cpu-timers.c:1310:19: error: use of undeclared identifier 'timer'
spin_unlock_irq(&timer.it_lock);
^
kernel/time/posix-cpu-timers.c:1312:17: error: use of undeclared identifier 'timer'
spin_lock_irq(&timer.it_lock);
^
2 errors generated.


vim +/timer +1310 kernel/time/posix-cpu-timers.c

1307
1308 static void posix_cpu_timer_wait_running_nsleep(struct k_itimer *timr)
1309 {
> 1310 spin_unlock_irq(&timer.it_lock);
1311 cpu_relax();
1312 spin_lock_irq(&timer.it_lock);
1313 }
1314

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests