tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 3fd472966bcc21f40dc20bb47c7ad18392fbec05 commit: f7c232d3e20a69b46e53da221ba3cbac0fa68a0d [2552/7643] smart_grid: introduce smart_grid_strategy_ctrl sysctl config: x86_64-randconfig-r123-20240430 (https://download.01.org/0day-ci/archive/20240430/202404300812.EAGGykdR-lkp@i...) compiler: clang version 18.1.4 (https://github.com/llvm/llvm-project e6c3289804a67ea0bb6a86fadbe454dd93b8d855) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240430/202404300812.EAGGykdR-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202404300812.EAGGykdR-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/sched/fair.c:314:15: error: use of undeclared identifier 'hundred_thousand'
314 | .extra2 = &hundred_thousand, | ^
kernel/sched/fair.c:322:2: error: invalid application of 'sizeof' to an incomplete type 'struct ctl_table[]'
322 | register_sysctl_init("kernel", sched_fair_sysctls); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/sysctl.h:241:46: note: expanded from macro 'register_sysctl_init' 241 | __register_sysctl_init(path, table, #table, ARRAY_SIZE(table)) | ^~~~~~~~~~~~~~~~~ include/linux/kernel.h:57:32: note: expanded from macro 'ARRAY_SIZE' 57 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | ^~~~~ kernel/sched/fair.c:7104:6: warning: no previous prototype for function 'free_affinity_domains' [-Wmissing-prototypes] 7104 | void free_affinity_domains(struct affinity_domain *ad) | ^ kernel/sched/fair.c:7104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 7104 | void free_affinity_domains(struct affinity_domain *ad) | ^ | static 1 warning and 2 errors generated.
vim +/hundred_thousand +314 kernel/sched/fair.c
216 217 #ifdef CONFIG_SYSCTL 218 static struct ctl_table sched_fair_sysctls[] = { 219 { 220 .procname = "sched_child_runs_first", 221 .data = &sysctl_sched_child_runs_first, 222 .maxlen = sizeof(unsigned int), 223 .mode = 0644, 224 .proc_handler = proc_dointvec, 225 }, 226 #ifdef CONFIG_CFS_BANDWIDTH 227 { 228 .procname = "sched_cfs_bandwidth_slice_us", 229 .data = &sysctl_sched_cfs_bandwidth_slice, 230 .maxlen = sizeof(unsigned int), 231 .mode = 0644, 232 .proc_handler = proc_dointvec_minmax, 233 .extra1 = SYSCTL_ONE, 234 }, 235 #endif 236 #ifdef CONFIG_NUMA_BALANCING 237 { 238 .procname = "numa_balancing_promote_rate_limit_MBps", 239 .data = &sysctl_numa_balancing_promote_rate_limit, 240 .maxlen = sizeof(unsigned int), 241 .mode = 0644, 242 .proc_handler = proc_dointvec_minmax, 243 .extra1 = SYSCTL_ZERO, 244 }, 245 #endif /* CONFIG_NUMA_BALANCING */ 246 #ifdef CONFIG_QOS_SCHED 247 { 248 .procname = "qos_overload_detect_period_ms", 249 .data = &sysctl_overload_detect_period, 250 .maxlen = sizeof(unsigned int), 251 .mode = 0644, 252 .proc_handler = proc_dointvec_minmax, 253 .extra1 = SYSCTL_ONE_HUNDRED, 254 .extra2 = &hundred_thousand, 255 }, 256 { 257 .procname = "qos_offline_wait_interval_ms", 258 .data = &sysctl_offline_wait_interval, 259 .maxlen = sizeof(unsigned int), 260 .mode = 0644, 261 .proc_handler = proc_dointvec_minmax, 262 .extra1 = SYSCTL_ONE_HUNDRED, 263 .extra2 = &one_thousand, 264 }, 265 #endif 266 #ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY 267 { 268 .procname = "sched_util_low_pct", 269 .data = &sysctl_sched_util_low_pct, 270 .maxlen = sizeof(sysctl_sched_util_low_pct), 271 .mode = 0644, 272 .proc_handler = proc_dointvec_minmax, 273 .extra1 = SYSCTL_ZERO, 274 .extra2 = SYSCTL_ONE_HUNDRED, 275 }, 276 #endif 277 #ifdef CONFIG_QOS_SCHED_PRIO_LB 278 { 279 .procname = "sched_prio_load_balance_enabled", 280 .data = &sysctl_sched_prio_load_balance_enabled, 281 .maxlen = sizeof(unsigned int), 282 .mode = 0644, 283 .proc_handler = proc_dointvec_minmax, 284 .extra1 = SYSCTL_ZERO, 285 .extra2 = SYSCTL_ONE, 286 }, 287 #endif 288 #ifdef CONFIG_QOS_SCHED_MULTILEVEL 289 { 290 .procname = "qos_level_weights", 291 .data = &sysctl_qos_level_weights, 292 .maxlen = 5*sizeof(int), 293 .mode = 0644, 294 .proc_handler = proc_dointvec, 295 }, 296 #endif 297 #ifdef CONFIG_QOS_SCHED_SMART_GRID 298 { 299 .procname = "smart_grid_strategy_ctrl", 300 .data = &sysctl_smart_grid_strategy_ctrl, 301 .maxlen = sizeof(unsigned int), 302 .mode = 0644, 303 .proc_handler = proc_dointvec_minmax, 304 .extra1 = SYSCTL_ZERO, 305 .extra2 = SYSCTL_ONE, 306 }, 307 { 308 .procname = "affinity_adjust_delay_ms", 309 .data = &sysctl_affinity_adjust_delay_ms, 310 .maxlen = sizeof(unsigned int), 311 .mode = 0644, 312 .proc_handler = proc_dointvec_minmax, 313 .extra1 = SYSCTL_ZERO,
314 .extra2 = &hundred_thousand,
315 }, 316 #endif 317 {} 318 }; 319 320 static int __init sched_fair_sysctl_init(void) 321 {
322 register_sysctl_init("kernel", sched_fair_sysctls);
323 return 0; 324 } 325 late_initcall(sched_fair_sysctl_init); 326 #endif 327