[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210192334.OKiM34VD-lkp@intel.com>
Date: Wed, 19 Oct 2022 23:38:19 +0800
From: kernel test robot <lkp@...el.com>
To: Patrick Bellasi <patrick.bellasi@....com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Guenter Roeck <groeck@...omium.org>,
Chris Redpath <chris.redpath@....com>
Subject: [jsarha:topic/cros-sof-v4.14-rebase 1448/9999]
kernel/sched/tune.c:24:29: error: field 'css' has incomplete type
Hi Patrick,
FYI, the error/warning still remains.
tree: https://github.com/jsarha/linux topic/cros-sof-v4.14-rebase
head: 18a233f3f676a98dde00947535d99ab1a54da340
commit: cff40181bbc8b813ccefb839a1f7b51e9aa598f3 [1448/9999] ANDROID: sched: fair/tune: Add schedtune with cgroups interface
config: sparc-randconfig-m041-20221019
compiler: sparc-linux-gcc (GCC) 7.5.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/jsarha/linux/commit/cff40181bbc8b813ccefb839a1f7b51e9aa598f3
git remote add jsarha https://github.com/jsarha/linux
git fetch --no-tags jsarha topic/cros-sof-v4.14-rebase
git checkout cff40181bbc8b813ccefb839a1f7b51e9aa598f3
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash kernel/sched/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
In file included from kernel/sched/sched.h:6:0,
from kernel/sched/tune.c:11:
include/linux/sched/topology.h:196:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
^~~~~
In file included from kernel/sched/tune.c:11:0:
kernel/sched/sched.h:1106:34: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
const struct sched_group_energy const *sge;
^~~~~
>> kernel/sched/tune.c:24:29: error: field 'css' has incomplete type
struct cgroup_subsys_state css;
^~~
In file included from include/asm-generic/bug.h:5:0,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/sparc/include/asm/current.h:15,
from include/linux/sched.h:12,
from include/linux/cgroup.h:12,
from kernel/sched/tune.c:1:
kernel/sched/tune.c: In function 'css_st':
>> include/linux/kernel.h:929:32: error: dereferencing pointer to incomplete type 'struct cgroup_subsys_state'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:305:19: note: in definition of macro '__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:328:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:47:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:929:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:929:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
kernel/sched/tune.c:39:15: note: in expansion of macro 'container_of'
return css ? container_of(css, struct schedtune, css) : NULL;
^~~~~~~~~~~~
kernel/sched/tune.c: In function 'task_schedtune':
>> kernel/sched/tune.c:44:16: error: implicit declaration of function 'task_css'; did you mean 'task_cpu'? [-Werror=implicit-function-declaration]
return css_st(task_css(tsk, schedtune_cgrp_id));
^~~~~~~~
task_cpu
>> kernel/sched/tune.c:44:30: error: 'schedtune_cgrp_id' undeclared (first use in this function); did you mean 'schedtune_spc_rdiv'?
return css_st(task_css(tsk, schedtune_cgrp_id));
^~~~~~~~~~~~~~~~~
schedtune_spc_rdiv
kernel/sched/tune.c:44:30: note: each undeclared identifier is reported only once for each function it appears in
kernel/sched/tune.c: At top level:
>> kernel/sched/tune.c:230:33: warning: 'struct cgroup_taskset' declared inside parameter list will not be visible outside of this definition or declaration
int schedtune_can_attach(struct cgroup_taskset *tset)
^~~~~~~~~~~~~~
kernel/sched/tune.c:230:5: warning: no previous declaration for 'schedtune_can_attach' [-Wmissing-declarations]
int schedtune_can_attach(struct cgroup_taskset *tset)
^~~~~~~~~~~~~~~~~~~~
kernel/sched/tune.c: In function 'schedtune_can_attach':
>> kernel/sched/tune.c:246:2: error: implicit declaration of function 'cgroup_taskset_for_each'; did you mean 'cgroup_sk_free'? [-Werror=implicit-function-declaration]
cgroup_taskset_for_each(task, css, tset) {
^~~~~~~~~~~~~~~~~~~~~~~
cgroup_sk_free
>> kernel/sched/tune.c:246:43: error: expected ';' before '{' token
cgroup_taskset_for_each(task, css, tset) {
^
kernel/sched/tune.c:240:6: warning: unused variable 'tasks' [-Wunused-variable]
int tasks;
^~~~~
kernel/sched/tune.c:239:6: warning: unused variable 'dst_bg' [-Wunused-variable]
int dst_bg; /* Destination boost group index */
^~~~~~
kernel/sched/tune.c:238:6: warning: unused variable 'src_bg' [-Wunused-variable]
int src_bg; /* Source boost group index */
^~~~~~
kernel/sched/tune.c:237:13: warning: unused variable 'rq' [-Wunused-variable]
struct rq *rq;
^~
kernel/sched/tune.c:236:15: warning: unused variable 'cpu' [-Wunused-variable]
unsigned int cpu;
^~~
kernel/sched/tune.c:235:18: warning: unused variable 'rq_flags' [-Wunused-variable]
struct rq_flags rq_flags;
^~~~~~~~
kernel/sched/tune.c:234:23: warning: unused variable 'bg' [-Wunused-variable]
struct boost_groups *bg;
^~
kernel/sched/tune.c: At top level:
kernel/sched/tune.c:303:37: warning: 'struct cgroup_taskset' declared inside parameter list will not be visible outside of this definition or declaration
void schedtune_cancel_attach(struct cgroup_taskset *tset)
^~~~~~~~~~~~~~
kernel/sched/tune.c:303:6: warning: no previous declaration for 'schedtune_cancel_attach' [-Wmissing-declarations]
void schedtune_cancel_attach(struct cgroup_taskset *tset)
^~~~~~~~~~~~~~~~~~~~~~~
>> kernel/sched/tune.c:384:58: warning: 'struct cftype' declared inside parameter list will not be visible outside of this definition or declaration
prefer_idle_read(struct cgroup_subsys_state *css, struct cftype *cft)
^~~~~~
kernel/sched/tune.c:392:59: warning: 'struct cftype' declared inside parameter list will not be visible outside of this definition or declaration
prefer_idle_write(struct cgroup_subsys_state *css, struct cftype *cft,
^~~~~~
kernel/sched/tune.c:402:52: warning: 'struct cftype' declared inside parameter list will not be visible outside of this definition or declaration
boost_read(struct cgroup_subsys_state *css, struct cftype *cft)
^~~~~~
kernel/sched/tune.c:410:53: warning: 'struct cftype' declared inside parameter list will not be visible outside of this definition or declaration
boost_write(struct cgroup_subsys_state *css, struct cftype *cft,
^~~~~~
>> kernel/sched/tune.c:426:22: error: array type has incomplete element type 'struct cftype'
static struct cftype files[] = {
^~~~~
>> kernel/sched/tune.c:428:3: error: field name not in record or union initializer
.name = "boost",
^
kernel/sched/tune.c:428:3: note: (near initialization for 'files')
kernel/sched/tune.c:429:3: error: field name not in record or union initializer
.read_s64 = boost_read,
^
kernel/sched/tune.c:429:3: note: (near initialization for 'files')
kernel/sched/tune.c:430:3: error: field name not in record or union initializer
.write_s64 = boost_write,
^
kernel/sched/tune.c:430:3: note: (near initialization for 'files')
kernel/sched/tune.c:433:3: error: field name not in record or union initializer
.name = "prefer_idle",
^
kernel/sched/tune.c:433:3: note: (near initialization for 'files')
kernel/sched/tune.c:434:3: error: field name not in record or union initializer
.read_u64 = prefer_idle_read,
^
kernel/sched/tune.c:434:3: note: (near initialization for 'files')
kernel/sched/tune.c:435:3: error: field name not in record or union initializer
.write_u64 = prefer_idle_write,
^
kernel/sched/tune.c:435:3: note: (near initialization for 'files')
>> kernel/sched/tune.c:521:8: error: variable 'schedtune_cgrp_subsys' has initializer but incomplete type
struct cgroup_subsys schedtune_cgrp_subsys = {
^~~~~~~~~~~~~
>> kernel/sched/tune.c:522:3: error: 'struct cgroup_subsys' has no member named 'css_alloc'
.css_alloc = schedtune_css_alloc,
^~~~~~~~~
>> kernel/sched/tune.c:522:15: warning: excess elements in struct initializer
.css_alloc = schedtune_css_alloc,
^~~~~~~~~~~~~~~~~~~
kernel/sched/tune.c:522:15: note: (near initialization for 'schedtune_cgrp_subsys')
>> kernel/sched/tune.c:523:3: error: 'struct cgroup_subsys' has no member named 'css_free'
.css_free = schedtune_css_free,
^~~~~~~~
kernel/sched/tune.c:523:14: warning: excess elements in struct initializer
.css_free = schedtune_css_free,
^~~~~~~~~~~~~~~~~~
kernel/sched/tune.c:523:14: note: (near initialization for 'schedtune_cgrp_subsys')
>> kernel/sched/tune.c:524:3: error: 'struct cgroup_subsys' has no member named 'can_attach'
.can_attach = schedtune_can_attach,
^~~~~~~~~~
kernel/sched/tune.c:524:20: warning: excess elements in struct initializer
.can_attach = schedtune_can_attach,
^~~~~~~~~~~~~~~~~~~~
kernel/sched/tune.c:524:20: note: (near initialization for 'schedtune_cgrp_subsys')
>> kernel/sched/tune.c:525:3: error: 'struct cgroup_subsys' has no member named 'cancel_attach'
.cancel_attach = schedtune_cancel_attach,
^~~~~~~~~~~~~
kernel/sched/tune.c:525:20: warning: excess elements in struct initializer
.cancel_attach = schedtune_cancel_attach,
^~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/tune.c:525:20: note: (near initialization for 'schedtune_cgrp_subsys')
>> kernel/sched/tune.c:526:3: error: 'struct cgroup_subsys' has no member named 'legacy_cftypes'
.legacy_cftypes = files,
^~~~~~~~~~~~~~
kernel/sched/tune.c:526:20: warning: excess elements in struct initializer
.legacy_cftypes = files,
^~~~~
kernel/sched/tune.c:526:20: note: (near initialization for 'schedtune_cgrp_subsys')
>> kernel/sched/tune.c:527:3: error: 'struct cgroup_subsys' has no member named 'early_init'
.early_init = 1,
^~~~~~~~~~
kernel/sched/tune.c:527:16: warning: excess elements in struct initializer
.early_init = 1,
^
kernel/sched/tune.c:527:16: note: (near initialization for 'schedtune_cgrp_subsys')
>> kernel/sched/tune.c:521:22: error: storage size of 'schedtune_cgrp_subsys' isn't known
struct cgroup_subsys schedtune_cgrp_subsys = {
^~~~~~~~~~~~~~~~~~~~~
kernel/sched/tune.c: In function 'task_schedtune':
>> kernel/sched/tune.c:45:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
kernel/sched/tune.c: In function 'schedtune_can_attach':
kernel/sched/tune.c:301:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
At top level:
kernel/sched/tune.c:426:22: warning: 'files' defined but not used [-Wunused-variable]
static struct cftype files[] = {
^~~~~
cc1: some warnings being treated as errors
vim +/css +24 kernel/sched/tune.c
16
17 /*
18 * EAS scheduler tunables for task groups.
19 */
20
21 /* SchdTune tunables for a group of tasks */
22 struct schedtune {
23 /* SchedTune CGroup subsystem */
> 24 struct cgroup_subsys_state css;
25
26 /* Boost group allocated ID */
27 int idx;
28
29 /* Boost value for tasks on that SchedTune CGroup */
30 int boost;
31
32 /* Hint to bias scheduling of tasks on that SchedTune CGroup
33 * towards idle CPUs */
34 int prefer_idle;
35 };
36
37 static inline struct schedtune *css_st(struct cgroup_subsys_state *css)
38 {
39 return css ? container_of(css, struct schedtune, css) : NULL;
40 }
41
42 static inline struct schedtune *task_schedtune(struct task_struct *tsk)
43 {
> 44 return css_st(task_css(tsk, schedtune_cgrp_id));
> 45 }
46
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (92273 bytes)
Powered by blists - more mailing lists