tree:
https://android.googlesource.com/kernel/common android12-5.10
head: fa9c9074531e448cf3647d6984b3122619c1834a
commit: 1efc36b815769cb8c7dae1d53373b190c017f5d1 [12636/13765] ANDROID: sched: add a
helper function to change PELT half-life
config: i386-buildonly-randconfig-r002-20211014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 1efc36b815769cb8c7dae1d53373b190c017f5d1
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> kernel/sched/pelt.c:35:5: warning: no previous prototype for
'get_pelt_halflife' [-Wmissing-prototypes]
35 | int
get_pelt_halflife(void)
| ^~~~~~~~~~~~~~~~~
> kernel/sched/pelt.c:68:5: warning: no previous prototype for
'set_pelt_halflife' [-Wmissing-prototypes]
68 | int
set_pelt_halflife(int num)
| ^~~~~~~~~~~~~~~~~
vim +/get_pelt_halflife +35 kernel/sched/pelt.c
34
35 int get_pelt_halflife(void)
36 {
37 return pelt_load_avg_period;
38 }
39 EXPORT_SYMBOL_GPL(get_pelt_halflife);
40
41 static int __set_pelt_halflife(void *data)
42 {
43 int rc = 0;
44 int num = *(int *)data;
45
46 switch (num) {
47 case PELT8_LOAD_AVG_PERIOD:
48 pelt_load_avg_period = PELT8_LOAD_AVG_PERIOD;
49 pelt_load_avg_max = PELT8_LOAD_AVG_MAX;
50 pelt_runnable_avg_yN_inv = pelt8_runnable_avg_yN_inv;
51 pr_info("PELT half life is set to %dms\n", num);
52 break;
53 case PELT32_LOAD_AVG_PERIOD:
54 pelt_load_avg_period = PELT32_LOAD_AVG_PERIOD;
55 pelt_load_avg_max = PELT32_LOAD_AVG_MAX;
56 pelt_runnable_avg_yN_inv = pelt32_runnable_avg_yN_inv;
57 pr_info("PELT half life is set to %dms\n", num);
58 break;
59 default:
60 rc = -EINVAL;
61 pr_err("Failed to set PELT half life to %dms, the current value is
%dms\n",
62 num, pelt_load_avg_period);
63 }
64
65 return rc;
66 }
67
68 int set_pelt_halflife(int num)
69 {
70 return stop_machine(__set_pelt_halflife, &num, NULL);
71 }
72 EXPORT_SYMBOL_GPL(set_pelt_halflife);
73
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org