All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
@ 2022-01-31  7:51 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-31  7:51 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 16098 bytes --]

tree:   https://github.com/zen-kernel/zen-kernel 5.16/prjc
head:   afc445ebe063a19bcb9288bb90a35b4a57c445b0
commit: 66c9e1d4d6d8cdbab63563dea4c5421c44fd8b20 [63/262] sched/alt: Introduce sched_best_cpu().
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220131/202201311533.7qZmdyi8-lkp(a)intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 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/66c9e1d4d6d8cdbab63563dea4c5421c44fd8b20
        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=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash kernel/sched/

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

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 member named 'state'; did you mean 'stats'?
    5521 |         if (state_filter == TASK_UNINTERRUPTIBLE && p->state == 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_state_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 member named 'state'; did you mean 'stats'?
    5587 |         idle->state = 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 'sched_cpu_activate' [-Wmissing-prototypes]
    5810 | int sched_cpu_activate(unsigned int cpu)
         |     ^~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c:5843:5: warning: no previous prototype for 'sched_cpu_deactivate' [-Wmissing-prototypes]
    5843 | int sched_cpu_deactivate(unsigned int cpu)
         |     ^~~~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c:5886:5: warning: no previous prototype for 'sched_cpu_starting' [-Wmissing-prototypes]
    5886 | int sched_cpu_starting(unsigned int cpu)
         |     ^~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c:5894:5: warning: no previous prototype for 'sched_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=implicit-function-declaration]
    5956 |                 per_cpu(sd_llc_id, cpu) = cpumask_first(cpu_coregroup_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) = cpumask_first(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:193:64: note: expected 'const struct cpumask *' but argument is of type 'int'
     193 | static inline unsigned int cpumask_first(const struct cpumask *srcp)
         |                                          ~~~~~~~~~~~~~~~~~~~~~~^~~~
   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(cpu), 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(cpu), 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_sleep'; have 'void(const char *, int,  int)'
    6109 | void __might_sleep(const char *file, int line, int preempt_offset)
         |      ^~~~~~~~~~~~~
   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_sleep' 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 member named 'state'; did you mean 'stats'?
    6116 |         WARN_ONCE(current->state != TASK_RUNNING && current->task_state_change,
         |                            ^~~~~
   include/linux/once_lite.h:15:41: note: in definition of macro 'DO_ONCE_LITE_IF'
      15 |                 bool __ret_do_once = !!(condition);                     \
         |                                         ^~~~~~~~~
   kernel/sched/alt_core.c:6116:9: note: in expansion of macro 'WARN_ONCE'
    6116 |         WARN_ONCE(current->state != TASK_RUNNING && current->task_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 member named 'state'; did you mean 'stats'?
    6119 |                         current->state,
         |                                  ^~~~~
   include/asm-generic/bug.h:99:31: note: in definition of macro '__WARN_printf'
      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_LITE_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 != TASK_RUNNING && current->task_state_change,
         |         ^~~~~~~~~
   kernel/sched/alt_core.c:6123:9: error: implicit declaration of function '___might_sleep'; did you mean '__might_sleep'? [-Werror=implicit-function-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 = sched_timeslice_ns;
  5949	
  5950			chk = &(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) = 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) = chk;
  5964			printk(KERN_INFO "sched: cpu#%02d llc_id = %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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-31  7:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-31  7:51 [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 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.