From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0852010747043290464==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [zen:5.16/prjc 1/262] kernel/sched/alt_core.c:5482:57: warning: passing argument 1 of 'cpumask_first' makes pointer from integer without a cast Date: Mon, 31 Jan 2022 12:25:37 +0800 Message-ID: <202201311213.i1wOSAeu-lkp@intel.com> List-Id: --===============0852010747043290464== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://github.com/zen-kernel/zen-kernel 5.16/prjc head: afc445ebe063a19bcb9288bb90a35b4a57c445b0 commit: 1d7e12db7a510fe6b80d8a6450c919b07db1cf76 [1/262] Project C v5.7.5-r2 config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220= 131/202201311213.i1wOSAeu-lkp(a)intel.com/config) compiler: powerpc-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/zen-kernel/zen-kernel/commit/1d7e12db7a510fe6b= 80d8a6450c919b07db1cf76 git remote add zen https://github.com/zen-kernel/zen-kernel git fetch --no-tags zen 5.16/prjc git checkout 1d7e12db7a510fe6b80d8a6450c919b07db1cf76 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dpowerpc SHELL=3D/bin/bash kernel/sched/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): from include/linux/sched.h:14, from kernel/sched/alt_sched.h:4, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: kernel/sched/alt_core.c: In function 'schedule_idle': kernel/sched/alt_core.c:3512:31: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 3512 | WARN_ON_ONCE(current->state); | ^~~~~ include/asm-generic/bug.h:104:32: note: in definition of macro 'WARN_ON_= ONCE' 104 | int __ret_warn_on =3D !!(condition); = \ | ^~~~~~~~~ kernel/sched/alt_core.c: In function '__sched_setscheduler': kernel/sched/alt_core.c:4031:46: error: 'MAX_USER_RT_PRIO' undeclared (f= irst use in this function); did you mean 'MAX_RT_PRIO'? 4031 | (p->mm && attr->sched_priority > MAX_USER_RT_PRIO - = 1) || | ^~~~~~~~~~~~~~~~ | MAX_RT_PRIO kernel/sched/alt_core.c:4031:46: note: each undeclared identifier is rep= orted only once for each function it appears in kernel/sched/alt_core.c: In function 'sched_setaffinity': kernel/sched/alt_core.c:4533:9: error: implicit declaration of function = 'get_online_cpus'; did you mean 'get_online_mems'? [-Werror=3Dimplicit-func= tion-declaration] 4533 | get_online_cpus(); | ^~~~~~~~~~~~~~~ | get_online_mems kernel/sched/alt_core.c:4539:17: error: implicit declaration of function= 'put_online_cpus'; did you mean 'num_online_cpus'? [-Werror=3Dimplicit-fun= ction-declaration] 4539 | put_online_cpus(); | ^~~~~~~~~~~~~~~ | num_online_cpus kernel/sched/alt_core.c: At top level: kernel/sched/alt_core.c:4749:13: error: redefinition of '_cond_resched' 4749 | int __sched _cond_resched(void) | ^~~~~~~~~~~~~ In file included from kernel/sched/alt_sched.h:4, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: include/linux/sched.h:2050:19: note: previous definition of '_cond_resch= ed' with type 'int(void)' 2050 | static inline int _cond_resched(void) | ^~~~~~~~~~~~~ kernel/sched/alt_core.c: In function '__do_sys_sched_get_priority_max': kernel/sched/alt_core.c:4902:23: error: 'MAX_USER_RT_PRIO' undeclared (f= irst use in this function); did you mean 'MAX_RT_PRIO'? 4902 | ret =3D MAX_USER_RT_PRIO-1; | ^~~~~~~~~~~~~~~~ | MAX_RT_PRIO kernel/sched/alt_core.c: In function 'sched_show_task': kernel/sched/alt_core.c:5010:16: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 5010 | if (p->state =3D=3D TASK_RUNNING) | ^~~~~ | stats kernel/sched/alt_core.c:5025:9: error: too few arguments to function 'sh= ow_stack' 5025 | show_stack(p, NULL); | ^~~~~~~~~~ In file included from kernel/sched/alt_sched.h:9, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: include/linux/sched/debug.h:33:13: note: declared here 33 | extern void show_stack(struct task_struct *task, unsigned long *= sp, | ^~~~~~~~~~ kernel/sched/alt_core.c: In function 'state_filter_match': kernel/sched/alt_core.c:5038:18: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 5038 | if (!(p->state & state_filter)) | ^~~~~ | stats kernel/sched/alt_core.c:5045:56: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 5045 | if (state_filter =3D=3D TASK_UNINTERRUPTIBLE && p->state= =3D=3D TASK_IDLE) | ^~~~~ | stats kernel/sched/alt_core.c: At top level: kernel/sched/alt_core.c:5052:6: error: conflicting types for 'show_state= _filter'; have 'void(long unsigned int)' 5052 | void show_state_filter(unsigned long state_filter) | ^~~~~~~~~~~~~~~~~ In file included from kernel/sched/alt_sched.h:9, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: include/linux/sched/debug.h:17:13: note: previous declaration of 'show_s= tate_filter' with type 'void(unsigned int)' 17 | extern void show_state_filter(unsigned int state_filter); | ^~~~~~~~~~~~~~~~~ kernel/sched/alt_core.c: In function 'init_idle': kernel/sched/alt_core.c:5118:15: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 5118 | idle->state =3D TASK_RUNNING; | ^~~~~ | stats kernel/sched/alt_core.c: At top level: kernel/sched/alt_core.c:5191:6: warning: no previous prototype for 'idle= _task_exit' [-Wmissing-prototypes] 5191 | void idle_task_exit(void) | ^~~~~~~~~~~~~~ kernel/sched/alt_core.c:5340:5: warning: no previous prototype for 'sche= d_cpu_activate' [-Wmissing-prototypes] 5340 | int sched_cpu_activate(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~ kernel/sched/alt_core.c:5373:5: warning: no previous prototype for 'sche= d_cpu_deactivate' [-Wmissing-prototypes] 5373 | int sched_cpu_deactivate(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~~~ kernel/sched/alt_core.c:5416:5: warning: no previous prototype for 'sche= d_cpu_starting' [-Wmissing-prototypes] 5416 | int sched_cpu_starting(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~ kernel/sched/alt_core.c:5424:5: warning: no previous prototype for 'sche= d_cpu_dying' [-Wmissing-prototypes] 5424 | int sched_cpu_dying(unsigned int cpu) | ^~~~~~~~~~~~~~~ kernel/sched/alt_core.c: In function 'sched_init_topology_cpumask': kernel/sched/alt_core.c:5482:57: error: implicit declaration of function= 'cpu_coregroup_mask'; did you mean 'cpu_core_mask'? [-Werror=3Dimplicit-fu= nction-declaration] 5482 | per_cpu(sd_llc_id, cpu) =3D cpumask_first(cpu_co= regroup_mask(cpu)); | ^~~~~~~~= ~~~~~~~~~~ | cpu_core= _mask >> kernel/sched/alt_core.c:5482:57: warning: passing argument 1 of 'cpumask= _first' makes pointer from integer without a cast [-Wint-conversion] 5482 | per_cpu(sd_llc_id, cpu) =3D cpumask_first(cpu_co= regroup_mask(cpu)); | ^~~~~~~~= ~~~~~~~~~~~~~~~ | | | int In file included from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/pid.h:5, from include/linux/sched.h:14, from kernel/sched/alt_sched.h:4, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: include/linux/cpumask.h:193:64: note: expected 'const struct cpumask *' = but argument is of type 'int' 193 | static inline unsigned int cpumask_first(const struct cpumask *s= rcp) | ~~~~~~~~~~~~~~~~~~~~~~^= ~~~ >> kernel/sched/alt_core.c:5484:45: warning: passing argument 3 of 'cpumask= _and' makes pointer from integer without a cast [-Wint-conversion] 5484 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(c= pu), false); | ^~~~~~~~~~~~~~~~~~~~= ~~~ | | | int kernel/sched/alt_core.c:5461:35: note: in definition of macro 'TOPOLOGY_= CPUMASK' 5461 | if (cpumask_and(chk, chk, mask)) = \ | ^~~~ In file included from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/pid.h:5, from include/linux/sched.h:14, from kernel/sched/alt_sched.h:4, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: include/linux/cpumask.h:403:54: note: expected 'const struct cpumask *' = but argument is of type 'int' 403 | const struct cpumask *src2p) | ~~~~~~~~~~~~~~~~~~~~~~^~~~~ >> kernel/sched/alt_core.c:5484:45: warning: passing argument 2 of 'cpumask= _complement' makes pointer from integer without a cast [-Wint-conversion] 5484 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(c= pu), false); | ^~~~~~~~~~~~~~~~~~~~= ~~~ | | | int kernel/sched/alt_core.c:5465:41: note: in definition of macro 'TOPOLOGY_= CPUMASK' 5465 | cpumask_complement(chk, mask) | ^~~~ In file included from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/pid.h:5, from include/linux/sched.h:14, from kernel/sched/alt_sched.h:4, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: include/linux/cpumask.h:458:61: note: expected 'const struct cpumask *' = but argument is of type 'int' 458 | const struct cpumask *srcp) | ~~~~~~~~~~~~~~~~~~~~~~^~~~ kernel/sched/alt_core.c: At top level: kernel/sched/alt_core.c:5630:6: error: conflicting types for '__might_sl= eep'; have 'void(const char *, int, int)' 5630 | void __might_sleep(const char *file, int line, int preempt_offse= t) | ^~~~~~~~~~~~~ In file included from arch/powerpc/include/asm/page.h:11, from arch/powerpc/include/asm/thread_info.h:13, from include/linux/thread_info.h:60, from arch/powerpc/include/asm/ptrace.h:323, from arch/powerpc/include/asm/hw_irq.h:12, from arch/powerpc/include/asm/irqflags.h:12, from include/linux/irqflags.h:16, from include/asm-generic/cmpxchg-local.h:6, from arch/powerpc/include/asm/cmpxchg.h:526, from arch/powerpc/include/asm/atomic.h:11, from include/linux/atomic.h:7, from include/linux/rcupdate.h:25, from include/linux/rculist.h:11, from include/linux/pid.h:5, from include/linux/sched.h:14, from kernel/sched/alt_sched.h:4, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: include/linux/kernel.h:112:13: note: previous declaration of '__might_sl= eep' with type 'void(const char *, int)' 112 | extern void __might_sleep(const char *file, int line); | ^~~~~~~~~~~~~ In file included from include/asm-generic/bug.h:7, from arch/powerpc/include/asm/bug.h:149, from include/linux/bug.h:5, from arch/powerpc/include/asm/cmpxchg.h:8, from arch/powerpc/include/asm/atomic.h:11, from include/linux/atomic.h:7, from include/linux/rcupdate.h:25, from include/linux/rculist.h:11, from include/linux/pid.h:5, from include/linux/sched.h:14, from kernel/sched/alt_sched.h:4, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: kernel/sched/alt_core.c: In function '__might_sleep': kernel/sched/alt_core.c:5637:28: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 5637 | WARN_ONCE(current->state !=3D TASK_RUNNING && current->t= ask_state_change, | ^~~~~ include/linux/once_lite.h:15:41: note: in definition of macro 'DO_ONCE_L= ITE_IF' 15 | bool __ret_do_once =3D !!(condition); = \ | ^~~~~~~~~ kernel/sched/alt_core.c:5637:9: note: in expansion of macro 'WARN_ONCE' 5637 | WARN_ONCE(current->state !=3D TASK_RUNNING && current->t= ask_state_change, | ^~~~~~~~~ In file included from arch/powerpc/include/asm/bug.h:149, from include/linux/bug.h:5, from arch/powerpc/include/asm/cmpxchg.h:8, from arch/powerpc/include/asm/atomic.h:11, from include/linux/atomic.h:7, from include/linux/rcupdate.h:25, from include/linux/rculist.h:11, from include/linux/pid.h:5, from include/linux/sched.h:14, from kernel/sched/alt_sched.h:4, from kernel/sched/sched.h:6, from kernel/sched/alt_core.c:14: kernel/sched/alt_core.c:5640:34: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 5640 | current->state, | ^~~~~ include/asm-generic/bug.h:99:31: note: in definition of macro '__WARN_pr= intf' 99 | __warn_printk(arg); = \ | ^~~ include/linux/once_lite.h:19:25: note: in expansion of macro 'WARN' 19 | func(__VA_ARGS__); = \ | ^~~~ include/asm-generic/bug.h:150:9: note: in expansion of macro 'DO_ONCE_LI= TE_IF' 150 | DO_ONCE_LITE_IF(condition, WARN, 1, format) | ^~~~~~~~~~~~~~~ kernel/sched/alt_core.c:5637:9: note: in expansion of macro 'WARN_ONCE' 5637 | WARN_ONCE(current->state !=3D TASK_RUNNING && current->t= ask_state_change, | ^~~~~~~~~ kernel/sched/alt_core.c:5644:9: error: implicit declaration of function = '___might_sleep'; did you mean '__might_sleep'? [-Werror=3Dimplicit-functio= n-declaration] 5644 | ___might_sleep(file, line, preempt_offset); | ^~~~~~~~~~~~~~ | __might_sleep In file included from include/linux/linkage.h:7, from include/linux/printk.h:8, vim +/cpumask_first +5482 kernel/sched/alt_core.c 5422 = 5423 #ifdef CONFIG_HOTPLUG_CPU > 5424 int sched_cpu_dying(unsigned int cpu) 5425 { 5426 struct rq *rq =3D cpu_rq(cpu); 5427 unsigned long flags; 5428 = 5429 sched_tick_stop(cpu); 5430 raw_spin_lock_irqsave(&rq->lock, flags); 5431 set_rq_offline(rq); 5432 migrate_tasks(rq); 5433 raw_spin_unlock_irqrestore(&rq->lock, flags); 5434 = 5435 hrtick_clear(rq); 5436 return 0; 5437 } 5438 #endif 5439 = 5440 #ifdef CONFIG_SMP 5441 static void sched_init_topology_cpumask_early(void) 5442 { 5443 int cpu, level; 5444 cpumask_t *tmp; 5445 = 5446 for_each_possible_cpu(cpu) { 5447 for (level =3D 0; level < NR_CPU_AFFINITY_CHK_LEVEL; level++) { 5448 tmp =3D &(per_cpu(sched_cpu_affinity_masks, cpu)[level]); 5449 cpumask_copy(tmp, cpu_possible_mask); 5450 cpumask_clear_cpu(cpu, tmp); 5451 } 5452 per_cpu(sched_cpu_llc_mask, cpu) =3D 5453 &(per_cpu(sched_cpu_affinity_masks, cpu)[0]); 5454 per_cpu(sched_cpu_affinity_end_mask, cpu) =3D 5455 &(per_cpu(sched_cpu_affinity_masks, cpu)[1]); 5456 per_cpu(sd_llc_id, cpu) =3D cpu; 5457 } 5458 } 5459 = 5460 #define TOPOLOGY_CPUMASK(name, mask, last) \ 5461 if (cpumask_and(chk, chk, mask)) \ 5462 printk(KERN_INFO "sched: cpu#%02d affinity mask: 0x%08lx - "#name,\ 5463 cpu, (chk++)->bits[0]); \ 5464 if (!last) \ 5465 cpumask_complement(chk, mask) 5466 = 5467 static void sched_init_topology_cpumask(void) 5468 { 5469 int cpu; 5470 cpumask_t *chk; 5471 = 5472 for_each_online_cpu(cpu) { 5473 /* take chance to reset time slice for idle tasks */ 5474 cpu_rq(cpu)->idle->time_slice =3D sched_timeslice_ns; 5475 = 5476 chk =3D &(per_cpu(sched_cpu_affinity_masks, cpu)[0]); 5477 = 5478 cpumask_complement(chk, cpumask_of(cpu)); 5479 #ifdef CONFIG_SCHED_SMT 5480 TOPOLOGY_CPUMASK(smt, topology_sibling_cpumask(cpu), false); 5481 #endif > 5482 per_cpu(sd_llc_id, cpu) =3D cpumask_first(cpu_coregroup_mask(cpu)); 5483 per_cpu(sched_cpu_llc_mask, cpu) =3D chk; > 5484 TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false); 5485 = 5486 TOPOLOGY_CPUMASK(core, topology_core_cpumask(cpu), false); 5487 = 5488 TOPOLOGY_CPUMASK(others, cpu_online_mask, true); 5489 = 5490 per_cpu(sched_cpu_affinity_end_mask, cpu) =3D chk; 5491 printk(KERN_INFO "sched: cpu#%02d llc_id =3D %d, llc_mask idx =3D = %d\n", 5492 cpu, per_cpu(sd_llc_id, cpu), 5493 (int) (per_cpu(sched_cpu_llc_mask, cpu) - 5494 &(per_cpu(sched_cpu_affinity_masks, cpu)[0]))); 5495 } 5496 } 5497 #endif 5498 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============0852010747043290464==--