[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202506070954.D6Eg0juq-lkp@intel.com>
Date: Sat, 7 Jun 2025 09:59:34 +0800
From: kernel test robot <lkp@...el.com>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: [gustavoars:testing/wfamnae-next20250606 16/16]
kernel/sched/ext.c:3748:24: error: returning 'struct cgroup_hdr *' from a
function with incompatible return type 'struct cgroup *'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git testing/wfamnae-next20250606
head: 2aebeb5c325881159c6896f61fa4b16f2af46067
commit: 2aebeb5c325881159c6896f61fa4b16f2af46067 [16/16] cgroup: Avoid -Wflex-array-member-not-at-end warnings
config: x86_64-buildonly-randconfig-006-20250607 (https://download.01.org/0day-ci/archive/20250607/202506070954.D6Eg0juq-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250607/202506070954.D6Eg0juq-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506070954.D6Eg0juq-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:3748:24: error: returning 'struct cgroup_hdr *' from a function with incompatible return type 'struct cgroup *' [-Werror=incompatible-pointer-types]
3748 | return &cgrp_dfl_root.cgrp;
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/ext.c: In function 'scx_vexit':
kernel/sched/ext.c:5361:9: warning: function 'scx_vexit' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
5361 | vscnprintf(ei->msg, SCX_EXIT_MSG_LEN, fmt, args);
| ^~~~~~~~~~
kernel/sched/ext.c: In function '__bstr_format':
kernel/sched/ext.c:7150:27: warning: function '__bstr_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
7150 | bprintf_data.bin_args);
| ^~~~~~~~~~~~
kernel/sched/ext.c: In function 'scx_bpf_task_cgroup':
>> kernel/sched/ext.c:7445:31: error: initialization of 'struct cgroup *' from incompatible pointer type 'struct cgroup_hdr *' [-Werror=incompatible-pointer-types]
7445 | struct cgroup *cgrp = &cgrp_dfl_root.cgrp;
| ^
cc1: some warnings being treated as errors
vim +3748 kernel/sched/ext.c
f0e1a0643a59bf Tejun Heo 2024-06-18 3736
8195136669661f Tejun Heo 2024-09-04 3737 #ifdef CONFIG_EXT_GROUP_SCHED
8195136669661f Tejun Heo 2024-09-04 3738 static struct cgroup *tg_cgrp(struct task_group *tg)
8195136669661f Tejun Heo 2024-09-04 3739 {
8195136669661f Tejun Heo 2024-09-04 3740 /*
8195136669661f Tejun Heo 2024-09-04 3741 * If CGROUP_SCHED is disabled, @tg is NULL. If @tg is an autogroup,
8195136669661f Tejun Heo 2024-09-04 3742 * @tg->css.cgroup is NULL. In both cases, @tg can be treated as the
8195136669661f Tejun Heo 2024-09-04 3743 * root cgroup.
8195136669661f Tejun Heo 2024-09-04 3744 */
8195136669661f Tejun Heo 2024-09-04 3745 if (tg && tg->css.cgroup)
8195136669661f Tejun Heo 2024-09-04 3746 return tg->css.cgroup;
8195136669661f Tejun Heo 2024-09-04 3747 else
8195136669661f Tejun Heo 2024-09-04 @3748 return &cgrp_dfl_root.cgrp;
8195136669661f Tejun Heo 2024-09-04 3749 }
8195136669661f Tejun Heo 2024-09-04 3750
:::::: The code at line 3748 was first introduced by commit
:::::: 8195136669661fdfe54e9a8923c33b31c92fc1da sched_ext: Add cgroup support
:::::: TO: Tejun Heo <tj@...nel.org>
:::::: CC: Tejun Heo <tj@...nel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists