mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [gustavoars:testing/wfamnae-next20240919 1/14] kernel/sched/ext.c:3351:24: error: returning 'struct cgroup_hdr *' from a function with incompatible return type 'struct cgroup *'
@ 2024-09-22  4:52 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-22  4:52 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: oe-kbuild-all, Gustavo A. R. Silva, LKML

Hi Gustavo,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/wfamnae-next20240919
head:   c4fe76eb6cabd44e576f30024974d06c9bd5d6ca
commit: f86858bda9d881af35ad0e29d88afc58a02d0f09 [1/14] cgroup: Avoid -Wflex-array-member-not-at-end warnings
config: sparc-randconfig-002-20240922 (https://download.01.org/0day-ci/archive/20240922/202409221235.gxUlE6Vm-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240922/202409221235.gxUlE6Vm-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409221235.gxUlE6Vm-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/sched/build_policy.c:63:
   kernel/sched/ext.c: In function 'tg_cgrp':
>> kernel/sched/ext.c:3351:24: error: returning 'struct cgroup_hdr *' from a function with incompatible return type 'struct cgroup *' [-Wincompatible-pointer-types]
    3351 |                 return &cgrp_dfl_root.cgrp;
         |                        ^~~~~~~~~~~~~~~~~~~
   kernel/sched/ext.c: In function 'scx_cgroup_warn_missing_idle':
   kernel/sched/ext.c:3709:16: error: 'struct task_group' has no member named 'idle'
    3709 |         if (!tg->idle)
         |                ^~
   kernel/sched/ext.c: In function 'scx_ops_disable_workfn':
   kernel/sched/ext.c:4473:17: error: implicit declaration of function 'stack_trace_print'; did you mean 'event_trace_printk'? [-Wimplicit-function-declaration]
    4473 |                 stack_trace_print(ei->bt, ei->bt_len, 2);
         |                 ^~~~~~~~~~~~~~~~~
         |                 event_trace_printk
   kernel/sched/ext.c: In function 'scx_ops_exit_kind':
   kernel/sched/ext.c:4852:30: error: implicit declaration of function 'stack_trace_save'; did you mean 'stack_tracer_enable'? [-Wimplicit-function-declaration]
    4852 |                 ei->bt_len = stack_trace_save(ei->bt, SCX_EXIT_BT_LEN, 1);
         |                              ^~~~~~~~~~~~~~~~
         |                              stack_tracer_enable
   kernel/sched/ext.c: In function 'scx_bpf_task_cgroup':
>> kernel/sched/ext.c:7052:31: error: initialization of 'struct cgroup *' from incompatible pointer type 'struct cgroup_hdr *' [-Wincompatible-pointer-types]
    7052 |         struct cgroup *cgrp = &cgrp_dfl_root.cgrp;
         |                               ^
>> kernel/sched/ext.c:7065:22: error: assignment to 'struct cgroup *' from incompatible pointer type 'struct cgroup_hdr *' [-Wincompatible-pointer-types]
    7065 |                 cgrp = &cgrp_dfl_root.cgrp;
         |                      ^

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for GET_FREE_REGION
   Depends on [n]: SPARSEMEM [=n]
   Selected by [y]:
   - RESOURCE_KUNIT_TEST [=y] && RUNTIME_TESTING_MENU [=y] && KUNIT [=y]


vim +3351 kernel/sched/ext.c

f0e1a0643a59bf Tejun Heo 2024-06-18  3339  
8195136669661f Tejun Heo 2024-09-04  3340  #ifdef CONFIG_EXT_GROUP_SCHED
8195136669661f Tejun Heo 2024-09-04  3341  static struct cgroup *tg_cgrp(struct task_group *tg)
8195136669661f Tejun Heo 2024-09-04  3342  {
8195136669661f Tejun Heo 2024-09-04  3343  	/*
8195136669661f Tejun Heo 2024-09-04  3344  	 * If CGROUP_SCHED is disabled, @tg is NULL. If @tg is an autogroup,
8195136669661f Tejun Heo 2024-09-04  3345  	 * @tg->css.cgroup is NULL. In both cases, @tg can be treated as the
8195136669661f Tejun Heo 2024-09-04  3346  	 * root cgroup.
8195136669661f Tejun Heo 2024-09-04  3347  	 */
8195136669661f Tejun Heo 2024-09-04  3348  	if (tg && tg->css.cgroup)
8195136669661f Tejun Heo 2024-09-04  3349  		return tg->css.cgroup;
8195136669661f Tejun Heo 2024-09-04  3350  	else
8195136669661f Tejun Heo 2024-09-04 @3351  		return &cgrp_dfl_root.cgrp;
8195136669661f Tejun Heo 2024-09-04  3352  }
8195136669661f Tejun Heo 2024-09-04  3353  

:::::: The code at line 3351 was first introduced by commit
:::::: 8195136669661fdfe54e9a8923c33b31c92fc1da sched_ext: Add cgroup support

:::::: TO: Tejun Heo <tj@kernel.org>
:::::: CC: Tejun Heo <tj@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

only message in thread, other threads:[~2024-09-22  4:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-22  4:52 [gustavoars:testing/wfamnae-next20240919 1/14] kernel/sched/ext.c:3351:24: error: returning 'struct cgroup_hdr *' from a function with incompatible return type 'struct cgroup *' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®