[ammarfaizi2-block:tj/cgroup/for-next 7/8] kernel/cgroup/cgroup.c:1310:32: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'

From: kernel test robot
Date: Sat Jul 23 2022 - 04:30:25 EST


tree: https://github.com/ammarfaizi2/linux-block tj/cgroup/for-next
head: c87b1452249c69cdec70d5de64ea81f56e1ba3f8
commit: 79276d9e0dda30071b9a98045a3efa7e0a76938b [7/8] cgroup: Make !percpu threadgroup_rwsem operations optional
config: hexagon-randconfig-r041-20220722 (https://download.01.org/0day-ci/archive/20220723/202207231608.bk36zznz-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 12fbd2d377e396ad61bce56d71c98a1eb1bebfa9)
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
# https://github.com/ammarfaizi2/linux-block/commit/79276d9e0dda30071b9a98045a3efa7e0a76938b
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block tj/cgroup/for-next
git checkout 79276d9e0dda30071b9a98045a3efa7e0a76938b
# 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=hexagon SHELL=/bin/bash kernel/cgroup/

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

All error/warnings (new ones prefixed by >>):

>> kernel/cgroup/cgroup.c:1310:32: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
bool favoring = root->flags & CGRP_ROOT_FAVOR_DYNMODS;
^
kernel/cgroup/cgroup.c:1315:18: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
root->flags |= CGRP_ROOT_FAVOR_DYNMODS;
^
kernel/cgroup/cgroup.c:1318:19: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
root->flags &= ~CGRP_ROOT_FAVOR_DYNMODS;
^
>> kernel/cgroup/cgroup.c:1308:6: warning: no previous prototype for function 'cgroup_favor_dynmods' [-Wmissing-prototypes]
void cgroup_favor_dynmods(struct cgroup_root *root, bool favor)
^
kernel/cgroup/cgroup.c:1308:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void cgroup_favor_dynmods(struct cgroup_root *root, bool favor)
^
static
kernel/cgroup/cgroup.c:1912:17: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
ctx->flags |= CGRP_ROOT_FAVOR_DYNMODS;
^
kernel/cgroup/cgroup.c:1915:18: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
ctx->flags &= ~CGRP_ROOT_FAVOR_DYNMODS;
^
kernel/cgroup/cgroup.c:1942:23: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
root_flags & CGRP_ROOT_FAVOR_DYNMODS);
^
kernel/cgroup/cgroup.c:1960:28: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
if (cgrp_dfl_root.flags & CGRP_ROOT_FAVOR_DYNMODS)
^
kernel/cgroup/cgroup.c:2013:30: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
root->flags = ctx->flags & ~CGRP_ROOT_FAVOR_DYNMODS;
^
1 warning and 8 errors generated.
--
>> kernel/cgroup/cgroup-v1.c:878:20: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
if (root->flags & CGRP_ROOT_FAVOR_DYNMODS)
^
kernel/cgroup/cgroup-v1.c:970:17: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
ctx->flags |= CGRP_ROOT_FAVOR_DYNMODS;
^
kernel/cgroup/cgroup-v1.c:973:18: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
ctx->flags &= ~CGRP_ROOT_FAVOR_DYNMODS;
^
>> kernel/cgroup/cgroup-v1.c:1227:3: error: call to undeclared function 'cgroup_favor_dynmods'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
cgroup_favor_dynmods(root, ctx->flags & CGRP_ROOT_FAVOR_DYNMODS);
^
kernel/cgroup/cgroup-v1.c:1227:43: error: use of undeclared identifier 'CGRP_ROOT_FAVOR_DYNMODS'
cgroup_favor_dynmods(root, ctx->flags & CGRP_ROOT_FAVOR_DYNMODS);
^
5 errors generated.


vim +/CGRP_ROOT_FAVOR_DYNMODS +1310 kernel/cgroup/cgroup.c

1307
> 1308 void cgroup_favor_dynmods(struct cgroup_root *root, bool favor)
1309 {
> 1310 bool favoring = root->flags & CGRP_ROOT_FAVOR_DYNMODS;
1311
1312 /* see the comment above CGRP_ROOT_FAVOR_DYNMODS definition */
1313 if (favor && !favoring) {
1314 rcu_sync_enter(&cgroup_threadgroup_rwsem.rss);
1315 root->flags |= CGRP_ROOT_FAVOR_DYNMODS;
1316 } else if (!favor && favoring) {
1317 rcu_sync_exit(&cgroup_threadgroup_rwsem.rss);
1318 root->flags &= ~CGRP_ROOT_FAVOR_DYNMODS;
1319 }
1320 }
1321

--
0-DAY CI Kernel Test Service
https://01.org/lkp