[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202106140946.pDfi3IAN-lkp@intel.com>
Date: Mon, 14 Jun 2021 09:18:56 +0800
From: kernel test robot <lkp@...el.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
x86@...nel.org
Subject: [tip:tmp.tmp2 50/364] include/linux/kernel.h:706:51: error: 'struct
task_struct' has no member named 'rt'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head: adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 6528e8a95a1c2683f8a4c93b4a945175f89fdc3d [50/364] sched/headers, sched/rt: Move task_struct::rt to per_task(), finish
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=6528e8a95a1c2683f8a4c93b4a945175f89fdc3d
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip tmp.tmp2
git checkout 6528e8a95a1c2683f8a4c93b4a945175f89fdc3d
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:
kernel/sched/rt.c: In function 'rt_task_of':
>> include/linux/kernel.h:706:51: error: 'struct task_struct' has no member named 'rt'
706 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~
include/linux/compiler_types.h:308:9: note: in definition of macro '__compiletime_assert'
308 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:328:2: note: in expansion of macro '_compiletime_assert'
328 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:706:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
706 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:706:20: note: in expansion of macro '__same_type'
706 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
kernel/sched/rt.c:121:9: note: in expansion of macro 'container_of'
121 | return container_of(rt_se, struct task_struct, rt);
| ^~~~~~~~~~~~
>> include/linux/compiler_types.h:140:35: error: 'struct task_struct' has no member named 'rt'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:709:21: note: in expansion of macro 'offsetof'
709 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
kernel/sched/rt.c:121:9: note: in expansion of macro 'container_of'
121 | return container_of(rt_se, struct task_struct, rt);
| ^~~~~~~~~~~~
kernel/sched/rt.c: At top level:
kernel/sched/rt.c:670:6: warning: no previous prototype for 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
670 | bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c: In function 'rt_task_of':
kernel/sched/rt.c:122:1: error: control reaches end of non-void function [-Werror=return-type]
122 | }
| ^
cc1: some warnings being treated as errors
vim +706 include/linux/kernel.h
cf14f27f82af78 Alexei Starovoitov 2018-03-28 696
^1da177e4c3f41 Linus Torvalds 2005-04-16 697 /**
^1da177e4c3f41 Linus Torvalds 2005-04-16 698 * container_of - cast a member of a structure out to the containing structure
^1da177e4c3f41 Linus Torvalds 2005-04-16 699 * @ptr: the pointer to the member.
^1da177e4c3f41 Linus Torvalds 2005-04-16 700 * @type: the type of the container struct this is embedded in.
^1da177e4c3f41 Linus Torvalds 2005-04-16 701 * @member: the name of the member within the struct.
^1da177e4c3f41 Linus Torvalds 2005-04-16 702 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 703 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 704 #define container_of(ptr, type, member) ({ \
c7acec713d14c6 Ian Abbott 2017-07-12 705 void *__mptr = (void *)(ptr); \
c7acec713d14c6 Ian Abbott 2017-07-12 @706 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
c7acec713d14c6 Ian Abbott 2017-07-12 707 !__same_type(*(ptr), void), \
c7acec713d14c6 Ian Abbott 2017-07-12 708 "pointer type mismatch in container_of()"); \
c7acec713d14c6 Ian Abbott 2017-07-12 709 ((type *)(__mptr - offsetof(type, member))); })
^1da177e4c3f41 Linus Torvalds 2005-04-16 710
:::::: The code at line 706 was first introduced by commit
:::::: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
:::::: TO: Ian Abbott <abbotti@....co.uk>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (41434 bytes)
Powered by blists - more mailing lists