[mingo-tip:sched/headers 1617/2384] arch/mips/alchemy/common/clock.c:143:2: error: use of undeclared identifier 'preset_lpj'

From: kernel test robot
Date: Sun Jan 16 2022 - 18:16:35 EST


tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 4c707c1c0de83967079b4e385012fa5b00e2cd11
commit: 4a1f9d16bf267958eefcbac668167e6135f75621 [1617/2384] headers/deps: ktime: Remove the <linux/ktime_api.h> header from <linux/ktime.h>
config: mips-randconfig-c004-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170727.IDnTpMbA-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c63a3175c2947e8c1a2d3bbe16a8586600705c54)
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/mingo/tip.git/commit/?id=4a1f9d16bf267958eefcbac668167e6135f75621
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 4a1f9d16bf267958eefcbac668167e6135f75621
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> arch/mips/alchemy/common/clock.c:143:2: error: use of undeclared identifier 'preset_lpj'
preset_lpj = alchemy_clk_cpu_recalc(NULL, ALCHEMY_ROOTCLK_RATE);
^
arch/mips/alchemy/common/clock.c:144:2: error: use of undeclared identifier 'preset_lpj'
preset_lpj /= 2 * HZ;
^
arch/mips/alchemy/common/clock.c:141:13: warning: no previous prototype for function 'alchemy_set_lpj' [-Wmissing-prototypes]
void __init alchemy_set_lpj(void)
^
arch/mips/alchemy/common/clock.c:141:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init alchemy_set_lpj(void)
^
static
arch/mips/alchemy/common/clock.c:554:31: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
unsigned long div, v, flags, ret;
^
arch/mips/alchemy/common/clock.c:676:31: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
unsigned long div, v, flags, ret;
^
3 warnings and 2 errors generated.


vim +/preset_lpj +143 arch/mips/alchemy/common/clock.c

474402291a0ad4 Manuel Lauss 2014-07-23 140
45a848f7fa067a Manuel Lauss 2015-01-29 141 void __init alchemy_set_lpj(void)
45a848f7fa067a Manuel Lauss 2015-01-29 142 {
45a848f7fa067a Manuel Lauss 2015-01-29 @143 preset_lpj = alchemy_clk_cpu_recalc(NULL, ALCHEMY_ROOTCLK_RATE);
45a848f7fa067a Manuel Lauss 2015-01-29 144 preset_lpj /= 2 * HZ;
45a848f7fa067a Manuel Lauss 2015-01-29 145 }
45a848f7fa067a Manuel Lauss 2015-01-29 146

:::::: The code at line 143 was first introduced by commit
:::::: 45a848f7fa067a81ae606bb06b2edcdf53772eac MIPS: Alchemy: preset loops_per_jiffy based on CPU clock

:::::: TO: Manuel Lauss <manuel.lauss@xxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

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