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

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

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/20220131/202201311213.i1wOSAeu-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/1d7e12db7a510fe6b80d8a6450c919b07db1cf76
        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=$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 >>):

                    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 member 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 = !!(condition);                      \
         |                                ^~~~~~~~~
   kernel/sched/alt_core.c: In function '__sched_setscheduler':
   kernel/sched/alt_core.c:4031:46: error: 'MAX_USER_RT_PRIO' undeclared (first 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 reported 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=implicit-function-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=implicit-function-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_resched' 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 (first use in this function); did you mean 'MAX_RT_PRIO'?
    4902 |                 ret = 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 member named 'state'; did you mean 'stats'?
    5010 |         if (p->state == TASK_RUNNING)
         |                ^~~~~
         |                stats
   kernel/sched/alt_core.c:5025:9: error: too few arguments to function 'show_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 member 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 member named 'state'; did you mean 'stats'?
    5045 |         if (state_filter == TASK_UNINTERRUPTIBLE && p->state == 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_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:5118:15: error: 'struct task_struct' has no member named 'state'; did you mean 'stats'?
    5118 |         idle->state = 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 'sched_cpu_activate' [-Wmissing-prototypes]
    5340 | int sched_cpu_activate(unsigned int cpu)
         |     ^~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c:5373:5: warning: no previous prototype for 'sched_cpu_deactivate' [-Wmissing-prototypes]
    5373 | int sched_cpu_deactivate(unsigned int cpu)
         |     ^~~~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c:5416:5: warning: no previous prototype for 'sched_cpu_starting' [-Wmissing-prototypes]
    5416 | int sched_cpu_starting(unsigned int cpu)
         |     ^~~~~~~~~~~~~~~~~~
   kernel/sched/alt_core.c:5424:5: warning: no previous prototype for 'sched_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=implicit-function-declaration]
    5482 |                 per_cpu(sd_llc_id, cpu) = cpumask_first(cpu_coregroup_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) = 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 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 *srcp)
         |                                          ~~~~~~~~~~~~~~~~~~~~~~^~~~
>> 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(cpu), 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(cpu), 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_sleep'; have 'void(const char *, int,  int)'
    5630 | 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 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_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 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 member named 'state'; did you mean 'stats'?
    5637 |         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:5637:9: note: in expansion of macro 'WARN_ONCE'
    5637 |         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 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 member named 'state'; did you mean 'stats'?
    5640 |                         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:5637:9: note: in expansion of macro 'WARN_ONCE'
    5637 |         WARN_ONCE(current->state != TASK_RUNNING && current->task_state_change,
         |         ^~~~~~~~~
   kernel/sched/alt_core.c:5644:9: error: implicit declaration of function '___might_sleep'; did you mean '__might_sleep'? [-Werror=implicit-function-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 = 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 = 0; level < NR_CPU_AFFINITY_CHK_LEVEL; level++) {
  5448				tmp = &(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) =
  5453				&(per_cpu(sched_cpu_affinity_masks, cpu)[0]);
  5454			per_cpu(sched_cpu_affinity_end_mask, cpu) =
  5455				&(per_cpu(sched_cpu_affinity_masks, cpu)[1]);
  5456			per_cpu(sd_llc_id, cpu) = 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 = sched_timeslice_ns;
  5475	
  5476			chk = &(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) = cpumask_first(cpu_coregroup_mask(cpu));
  5483			per_cpu(sched_cpu_llc_mask, cpu) = 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) = chk;
  5491			printk(KERN_INFO "sched: cpu#%02d llc_id = %d, llc_mask idx = %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

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

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

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