[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210132251.qc6Bo29e-lkp@intel.com>
Date: Thu, 13 Oct 2022 22:09:23 +0800
From: kernel test robot <lkp@...el.com>
To: Waiman Long <longman@...hat.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>
Subject: [peterz-queue:sched/core 14/15] kernel/sched/core.c:9815:27: error:
incompatible pointer types passing 'cpumask_var_t' (aka 'struct cpumask[1]')
to parameter of type 'cpumask_var_t *' (aka 'struct cpumask (*)[1]'); take
the address with &
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: e7c69e86e29590d8bacd63595f3a687d97288ccc
commit: ecf44ad8a0325439035003643fd11725147fae18 [14/15] sched: Enforce user requested affinity
config: x86_64-randconfig-a005
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=ecf44ad8a0325439035003643fd11725147fae18
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/core
git checkout ecf44ad8a0325439035003643fd11725147fae18
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> kernel/sched/core.c:9815:27: error: incompatible pointer types passing 'cpumask_var_t' (aka 'struct cpumask[1]') to parameter of type 'cpumask_var_t *' (aka 'struct cpumask (*)[1]'); take the address with & [-Werror,-Wincompatible-pointer-types]
zalloc_cpumask_var_node(rq->scratch_mask, GFP_KERNEL, cpu_to_node(i));
^~~~~~~~~~~~~~~~
&
include/linux/cpumask.h:880:59: note: passing argument to parameter 'mask' here
static inline bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags,
^
1 error generated.
vim +9815 kernel/sched/core.c
9767
9768 rq->rt.rt_runtime = def_rt_bandwidth.rt_runtime;
9769 #ifdef CONFIG_RT_GROUP_SCHED
9770 init_tg_rt_entry(&root_task_group, &rq->rt, NULL, i, NULL);
9771 #endif
9772 #ifdef CONFIG_SMP
9773 rq->sd = NULL;
9774 rq->rd = NULL;
9775 rq->cpu_capacity = rq->cpu_capacity_orig = SCHED_CAPACITY_SCALE;
9776 rq->balance_callback = &balance_push_callback;
9777 rq->active_balance = 0;
9778 rq->next_balance = jiffies;
9779 rq->push_cpu = 0;
9780 rq->cpu = i;
9781 rq->online = 0;
9782 rq->idle_stamp = 0;
9783 rq->avg_idle = 2*sysctl_sched_migration_cost;
9784 rq->wake_stamp = jiffies;
9785 rq->wake_avg_idle = rq->avg_idle;
9786 rq->max_idle_balance_cost = sysctl_sched_migration_cost;
9787
9788 INIT_LIST_HEAD(&rq->cfs_tasks);
9789
9790 rq_attach_root(rq, &def_root_domain);
9791 #ifdef CONFIG_NO_HZ_COMMON
9792 rq->last_blocked_load_update_tick = jiffies;
9793 atomic_set(&rq->nohz_flags, 0);
9794
9795 INIT_CSD(&rq->nohz_csd, nohz_csd_func, rq);
9796 #endif
9797 #ifdef CONFIG_HOTPLUG_CPU
9798 rcuwait_init(&rq->hotplug_wait);
9799 #endif
9800 #endif /* CONFIG_SMP */
9801 hrtick_rq_init(rq);
9802 atomic_set(&rq->nr_iowait, 0);
9803
9804 #ifdef CONFIG_SCHED_CORE
9805 rq->core = rq;
9806 rq->core_pick = NULL;
9807 rq->core_enabled = 0;
9808 rq->core_tree = RB_ROOT;
9809 rq->core_forceidle_count = 0;
9810 rq->core_forceidle_occupation = 0;
9811 rq->core_forceidle_start = 0;
9812
9813 rq->core_cookie = 0UL;
9814 #endif
> 9815 zalloc_cpumask_var_node(rq->scratch_mask, GFP_KERNEL, cpu_to_node(i));
9816 }
9817
9818 set_load_weight(&init_task, false);
9819
9820 /*
9821 * The boot idle thread does lazy MMU switching as well:
9822 */
9823 mmgrab(&init_mm);
9824 enter_lazy_tlb(&init_mm, current);
9825
9826 /*
9827 * The idle task doesn't need the kthread struct to function, but it
9828 * is dressed up as a per-CPU kthread and thus needs to play the part
9829 * if we want to avoid special-casing it in code that deals with per-CPU
9830 * kthreads.
9831 */
9832 WARN_ON(!set_kthread_struct(current));
9833
9834 /*
9835 * Make us the idle thread. Technically, schedule() should not be
9836 * called from this thread, however somewhere below it might be,
9837 * but because we are the idle thread, we just pick up running again
9838 * when this runqueue becomes "idle".
9839 */
9840 init_idle(current, smp_processor_id());
9841
9842 calc_load_update = jiffies + LOAD_FREQ;
9843
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (140678 bytes)
Powered by blists - more mailing lists