[ammarfaizi2-block:google/android/kernel/common/deprecated/android-4.9-p-release 6326/9999] kernel/sched/fair.c:5431:15: warning: no previous declaration for 'capacity_min_of'

From: kernel test robot
Date: Wed Mar 02 2022 - 20:16:11 EST


Hi Ionela,

FYI, the error/warning still remains.

tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/deprecated/android-4.9-p-release
head: 74f5cdd2ad41ea660f18bcaf7ce3d8d3e8e88428
commit: 58b761f4c089c6138195334ebd5b1c880e502551 [6326/9999] sched/fair: introduce minimum capacity capping sched feature
config: i386-randconfig-r034-20211122 (https://download.01.org/0day-ci/archive/20220303/202203030914.dPl5K6Z8-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
# https://github.com/ammarfaizi2/linux-block/commit/58b761f4c089c6138195334ebd5b1c880e502551
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/deprecated/android-4.9-p-release
git checkout 58b761f4c089c6138195334ebd5b1c880e502551
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/ kernel/sched/

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

All warnings (new ones prefixed by >>):

In file included from kernel/sched/fair.c:23:0:
include/linux/sched.h:1260:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
^~~~~
kernel/sched/fair.c:3438:6: warning: no previous declaration for 'sync_entity_load_avg' [-Wmissing-declarations]
void sync_entity_load_avg(struct sched_entity *se)
^~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:3451:6: warning: no previous declaration for 'remove_entity_load_avg' [-Wmissing-declarations]
void remove_entity_load_avg(struct sched_entity *se)
^~~~~~~~~~~~~~~~~~~~~~
>> kernel/sched/fair.c:5431:15: warning: no previous declaration for 'capacity_min_of' [-Wmissing-declarations]
unsigned long capacity_min_of(int cpu)
^~~~~~~~~~~~~~~
kernel/sched/fair.c: In function 'find_best_target':
kernel/sched/fair.c:6703:16: warning: variable 'target_util' set but not used [-Wunused-but-set-variable]
unsigned long target_util = ULONG_MAX;
^~~~~~~~~~~
kernel/sched/fair.c: In function 'select_energy_cpu_brute':
kernel/sched/fair.c:5873:11: warning: array subscript is above array bounds [-Warray-bounds]
eenv->cpu[cpu_idx].nrg_delta = 0;
~~~~~~~~~^~~~~~~~~
arch/x86/include/asm/bitops.h: Assembler messages:
arch/x86/include/asm/bitops.h:211: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'


vim +/capacity_min_of +5431 kernel/sched/fair.c

5426
5427 /*
5428 * Returns the current capacity of cpu after applying both
5429 * cpu and min freq scaling.
5430 */
> 5431 unsigned long capacity_min_of(int cpu)
5432 {
5433 if (!sched_feat(MIN_CAPACITY_CAPPING))
5434 return 0;
5435 return arch_scale_cpu_capacity(NULL, cpu) *
5436 arch_scale_min_freq_capacity(NULL, cpu)
5437 >> SCHED_CAPACITY_SHIFT;
5438 }
5439

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