From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2872700717840379496==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [zen:5.16/prjc 63/262] kernel/sched/alt_core.c:5968:30: warning: passing argument 2 of 'cpumask_copy' makes pointer from integer without a cast Date: Mon, 31 Jan 2022 15:51:27 +0800 Message-ID: <202201311533.7qZmdyi8-lkp@intel.com> List-Id: --===============2872700717840379496== 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: 66c9e1d4d6d8cdbab63563dea4c5421c44fd8b20 [63/262] sched/alt: Introd= uce sched_best_cpu(). config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220= 131/202201311533.7qZmdyi8-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/66c9e1d4d6d8cdbab= 63563dea4c5421c44fd8b20 git remote add zen https://github.com/zen-kernel/zen-kernel git fetch --no-tags zen 5.16/prjc git checkout 66c9e1d4d6d8cdbab63563dea4c5421c44fd8b20 # 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 >>): 5514 | if (!(p->state & state_filter)) | ^~~~~ | stats kernel/sched/alt_core.c:5521:56: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 5521 | 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:5528:6: error: conflicting types for 'show_state= _filter'; have 'void(long unsigned int)' 5528 | 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:18: 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:5587:15: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 5587 | idle->state =3D TASK_RUNNING; | ^~~~~ | stats kernel/sched/alt_core.c: At top level: kernel/sched/alt_core.c:5661:6: warning: no previous prototype for 'idle= _task_exit' [-Wmissing-prototypes] 5661 | void idle_task_exit(void) | ^~~~~~~~~~~~~~ kernel/sched/alt_core.c:5810:5: warning: no previous prototype for 'sche= d_cpu_activate' [-Wmissing-prototypes] 5810 | int sched_cpu_activate(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~ kernel/sched/alt_core.c:5843:5: warning: no previous prototype for 'sche= d_cpu_deactivate' [-Wmissing-prototypes] 5843 | int sched_cpu_deactivate(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~~~ kernel/sched/alt_core.c:5886:5: warning: no previous prototype for 'sche= d_cpu_starting' [-Wmissing-prototypes] 5886 | int sched_cpu_starting(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~ kernel/sched/alt_core.c:5894:5: warning: no previous prototype for 'sche= d_cpu_dying' [-Wmissing-prototypes] 5894 | int sched_cpu_dying(unsigned int cpu) | ^~~~~~~~~~~~~~~ kernel/sched/alt_core.c: In function 'sched_init_topology_cpumask': kernel/sched/alt_core.c:5956:57: error: implicit declaration of function= 'cpu_coregroup_mask'; did you mean 'cpu_core_mask'? [-Werror=3Dimplicit-fu= nction-declaration] 5956 | per_cpu(sd_llc_id, cpu) =3D cpumask_first(cpu_co= regroup_mask(cpu)); | ^~~~~~~~= ~~~~~~~~~~ | cpu_core= _mask kernel/sched/alt_core.c:5956:57: warning: passing argument 1 of 'cpumask= _first' makes pointer from integer without a cast [-Wint-conversion] 5956 | 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 include/linux/kthread.h:6, from include/trace/events/sched.h:8, from kernel/sched/alt_core.c:15: 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:5957:45: warning: passing argument 3 of 'cpumask= _and' makes pointer from integer without a cast [-Wint-conversion] 5957 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(c= pu), false); | ^~~~~~~~~~~~~~~~~~~~= ~~~ | | | int kernel/sched/alt_core.c:5935:35: note: in definition of macro 'TOPOLOGY_= CPUMASK' 5935 | 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 include/linux/kthread.h:6, from include/trace/events/sched.h:8, from kernel/sched/alt_core.c:15: 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:5957:45: warning: passing argument 2 of 'cpumask= _complement' makes pointer from integer without a cast [-Wint-conversion] 5957 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(c= pu), false); | ^~~~~~~~~~~~~~~~~~~~= ~~~ | | | int kernel/sched/alt_core.c:5939:41: note: in definition of macro 'TOPOLOGY_= CPUMASK' 5939 | 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 include/linux/kthread.h:6, from include/trace/events/sched.h:8, from kernel/sched/alt_core.c:15: 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:5968:30: warning: passing argument 2 of 'cpumask= _copy' makes pointer from integer without a cast [-Wint-conversion] 5968 | cpu_coregroup_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 include/linux/kthread.h:6, from include/trace/events/sched.h:8, from kernel/sched/alt_core.c:15: include/linux/cpumask.h:575:55: note: expected 'const struct cpumask *' = but argument is of type 'int' 575 | const struct cpumask *srcp) | ~~~~~~~~~~~~~~~~~~~~~~^~~~ kernel/sched/alt_core.c: At top level: kernel/sched/alt_core.c:6109:6: error: conflicting types for '__might_sl= eep'; have 'void(const char *, int, int)' 6109 | 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 include/linux/kthread.h:6, from include/trace/events/sched.h:8, from kernel/sched/alt_core.c:15: 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 include/linux/kthread.h:6, from include/trace/events/sched.h:8, from kernel/sched/alt_core.c:15: kernel/sched/alt_core.c: In function '__might_sleep': kernel/sched/alt_core.c:6116:28: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 6116 | 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:6116:9: note: in expansion of macro 'WARN_ONCE' 6116 | 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 include/linux/kthread.h:6, from include/trace/events/sched.h:8, from kernel/sched/alt_core.c:15: kernel/sched/alt_core.c:6119:34: error: 'struct task_struct' has no memb= er named 'state'; did you mean 'stats'? 6119 | 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:6116:9: note: in expansion of macro 'WARN_ONCE' 6116 | WARN_ONCE(current->state !=3D TASK_RUNNING && current->t= ask_state_change, | ^~~~~~~~~ kernel/sched/alt_core.c:6123:9: error: implicit declaration of function = '___might_sleep'; did you mean '__might_sleep'? [-Werror=3Dimplicit-functio= n-declaration] 6123 | ___might_sleep(file, line, preempt_offset); | ^~~~~~~~~~~~~~ | __might_sleep In file included from include/linux/linkage.h:7, from include/linux/printk.h:8, from include/asm-generic/bug.h:22, from arch/powerpc/include/asm/bug.h:149, from include/linux/bug.h:5, vim +/cpumask_copy +5968 kernel/sched/alt_core.c 5933 = 5934 #define TOPOLOGY_CPUMASK(name, mask, last) \ 5935 if (cpumask_and(chk, chk, mask)) \ 5936 printk(KERN_INFO "sched: cpu#%02d affinity mask: 0x%08lx - "#name,\ 5937 cpu, (chk++)->bits[0]); \ 5938 if (!last) \ 5939 cpumask_complement(chk, mask) 5940 = 5941 static void sched_init_topology_cpumask(void) 5942 { 5943 int cpu; 5944 cpumask_t *chk; 5945 = 5946 for_each_online_cpu(cpu) { 5947 /* take chance to reset time slice for idle tasks */ 5948 cpu_rq(cpu)->idle->time_slice =3D sched_timeslice_ns; 5949 = 5950 chk =3D &(per_cpu(sched_cpu_affinity_masks, cpu)[0]); 5951 = 5952 cpumask_complement(chk, cpumask_of(cpu)); 5953 #ifdef CONFIG_SCHED_SMT 5954 TOPOLOGY_CPUMASK(smt, topology_sibling_cpumask(cpu), false); 5955 #endif 5956 per_cpu(sd_llc_id, cpu) =3D cpumask_first(cpu_coregroup_mask(cpu)); 5957 TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false); 5958 = 5959 TOPOLOGY_CPUMASK(core, topology_core_cpumask(cpu), false); 5960 = 5961 TOPOLOGY_CPUMASK(others, cpu_online_mask, true); 5962 = 5963 per_cpu(sched_cpu_affinity_end_mask, cpu) =3D chk; 5964 printk(KERN_INFO "sched: cpu#%02d llc_id =3D %d\n", 5965 cpu, per_cpu(sd_llc_id, cpu)); 5966 = 5967 cpumask_copy(sched_best_cpu_masks[cpu], > 5968 cpu_coregroup_mask(cpu)); 5969 } 5970 } 5971 #endif 5972 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============2872700717840379496==--