* [peterz-queue:sched/core-sched 27/29] kernel/sched/core.c:9396:35: error: incompatible type for argument 2 of 'sched_core_cgroup_online'
@ 2021-03-31 22:47 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-31 22:47 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6975 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core-sched
head: e30de7e3ea1fa2282b1eac0dd93479d4ddb91fea
commit: 3eac321e8dc316b01ff277c9cbbdbafd68c8631b [27/29] sched: Cgroup core-scheduling interface
config: arm-randconfig-s032-20210330 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-279-g6d5d9b42-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=3eac321e8dc316b01ff277c9cbbdbafd68c8631b
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-sched
git checkout 3eac321e8dc316b01ff277c9cbbdbafd68c8631b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
kernel/sched/core.c: In function 'sched_online_group':
>> kernel/sched/core.c:9396:35: error: incompatible type for argument 2 of 'sched_core_cgroup_online'
9396 | sched_core_cgroup_online(parent, tg);
| ^~
| |
| struct task_group *
kernel/sched/core.c:5731:90: note: expected 'struct task_group' but argument is of type 'struct task_group *'
5731 | static inline void sched_core_cgroup_online(struct task_group *parent, struct task_group tg) { }
| ~~~~~~~~~~~~~~~~~~^~
kernel/sched/core.c: In function 'sched_move_task':
>> kernel/sched/core.c:9489:11: error: implicit declaration of function 'sched_core_cgroup_cookie'; did you mean 'sched_core_cgroup_online'? [-Werror=implicit-function-declaration]
9489 | cookie = sched_core_cgroup_cookie(tsk->sched_task_group);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| sched_core_cgroup_online
>> kernel/sched/core.c:9490:11: error: implicit declaration of function 'sched_core_update_cookie' [-Werror=implicit-function-declaration]
9490 | cookie = sched_core_update_cookie(tsk, cookie);
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/sched/core.c:9491:2: error: implicit declaration of function 'sched_core_put_cookie' [-Werror=implicit-function-declaration]
9491 | sched_core_put_cookie(cookie);
| ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/sched_core_cgroup_online +9396 kernel/sched/core.c
9378
9379 void sched_online_group(struct task_group *tg, struct task_group *parent)
9380 {
9381 unsigned long flags;
9382
9383 spin_lock_irqsave(&task_group_lock, flags);
9384 list_add_rcu(&tg->list, &task_groups);
9385
9386 /* Root should already exist: */
9387 WARN_ON(!parent);
9388
9389 tg->parent = parent;
9390 INIT_LIST_HEAD(&tg->children);
9391 list_add_rcu(&tg->siblings, &parent->children);
9392 spin_unlock_irqrestore(&task_group_lock, flags);
9393
9394 online_fair_sched_group(tg);
9395
> 9396 sched_core_cgroup_online(parent, tg);
9397 }
9398
9399 /* rcu callback to free various structures associated with a task group */
9400 static void sched_free_group_rcu(struct rcu_head *rhp)
9401 {
9402 /* Now it should be safe to free those cfs_rqs: */
9403 sched_free_group(container_of(rhp, struct task_group, rcu));
9404 }
9405
9406 void sched_destroy_group(struct task_group *tg)
9407 {
9408 /* Wait for possible concurrent references to cfs_rqs complete: */
9409 call_rcu(&tg->rcu, sched_free_group_rcu);
9410 }
9411
9412 void sched_offline_group(struct task_group *tg)
9413 {
9414 unsigned long flags;
9415
9416 /* End participation in shares distribution: */
9417 unregister_fair_sched_group(tg);
9418
9419 spin_lock_irqsave(&task_group_lock, flags);
9420 list_del_rcu(&tg->list);
9421 list_del_rcu(&tg->siblings);
9422 spin_unlock_irqrestore(&task_group_lock, flags);
9423 }
9424
9425 static void sched_change_group(struct task_struct *tsk, int type)
9426 {
9427 struct task_group *tg;
9428
9429 /*
9430 * All callers are synchronized by task_rq_lock(); we do not use RCU
9431 * which is pointless here. Thus, we pass "true" to task_css_check()
9432 * to prevent lockdep warnings.
9433 */
9434 tg = container_of(task_css_check(tsk, cpu_cgrp_id, true),
9435 struct task_group, css);
9436 tg = autogroup_task_group(tsk, tg);
9437 tsk->sched_task_group = tg;
9438
9439 #ifdef CONFIG_FAIR_GROUP_SCHED
9440 if (tsk->sched_class->task_change_group)
9441 tsk->sched_class->task_change_group(tsk, type);
9442 else
9443 #endif
9444 set_task_rq(tsk, task_cpu(tsk));
9445 }
9446
9447 /*
9448 * Change task's runqueue when it moves between groups.
9449 *
9450 * The caller of this function should have put the task in its new group by
9451 * now. This function just updates tsk->se.cfs_rq and tsk->se.parent to reflect
9452 * its new group.
9453 */
9454 void sched_move_task(struct task_struct *tsk)
9455 {
9456 int queued, running, queue_flags =
9457 DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK;
9458 unsigned long cookie;
9459 struct rq_flags rf;
9460 struct rq *rq;
9461
9462 rq = task_rq_lock(tsk, &rf);
9463 update_rq_clock(rq);
9464
9465 running = task_current(rq, tsk);
9466 queued = task_on_rq_queued(tsk);
9467
9468 if (queued)
9469 dequeue_task(rq, tsk, queue_flags);
9470 if (running)
9471 put_prev_task(rq, tsk);
9472
9473 sched_change_group(tsk, TASK_MOVE_GROUP);
9474
9475 if (queued)
9476 enqueue_task(rq, tsk, queue_flags);
9477 if (running) {
9478 set_next_task(rq, tsk);
9479 /*
9480 * After changing group, the running task may have joined a
9481 * throttled one but it's still the running task. Trigger a
9482 * resched to make sure that task can still run.
9483 */
9484 resched_curr(rq);
9485 }
9486
9487 task_rq_unlock(rq, tsk, &rf);
9488
> 9489 cookie = sched_core_cgroup_cookie(tsk->sched_task_group);
> 9490 cookie = sched_core_update_cookie(tsk, cookie);
> 9491 sched_core_put_cookie(cookie);
9492 }
9493
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35444 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-31 22:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-31 22:47 [peterz-queue:sched/core-sched 27/29] kernel/sched/core.c:9396:35: error: incompatible type for argument 2 of 'sched_core_cgroup_online' 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.