Hi Vincent, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/sched/core] [also build test ERROR on v4.19-rc8 next-20181019] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Vincent-Guittot/sched-fair-move-rq_of-helper-function/20181020-081004 config: i386-randconfig-x002-201841 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All error/warnings (new ones prefixed by >>): In file included from arch/x86/include/asm/current.h:5:0, from include/linux/sched.h:12, from kernel/sched/pelt.c:27: kernel/sched/sched.h: In function 'rq_of': >> include/linux/kernel.h:997:51: error: dereferencing pointer to incomplete type 'struct rq' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ include/linux/compiler.h:335:18: note: in definition of macro '__compiletime_assert' int __cond = !(condition); \ ^~~~~~~~~ include/linux/compiler.h:358:2: note: in expansion of macro '_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:997:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:997:20: note: in expansion of macro '__same_type' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~ >> kernel/sched/sched.h:581:9: note: in expansion of macro 'container_of' return container_of(cfs_rq, struct rq, cfs); ^~~~~~~~~~~~ In file included from :0:0: >> include/linux/compiler_types.h:237:35: error: invalid use of undefined type 'struct rq' #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ^ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:1000:21: note: in expansion of macro 'offsetof' ((type *)(__mptr - offsetof(type, member))); }) ^~~~~~~~ >> kernel/sched/sched.h:581:9: note: in expansion of macro 'container_of' return container_of(cfs_rq, struct rq, cfs); ^~~~~~~~~~~~ -- In file included from arch/x86/include/asm/current.h:5:0, from include/linux/sched.h:12, from kernel/sched/sched.h:5, from kernel/sched/fair.c:23: kernel/sched/sched.h: In function 'rq_of': >> include/linux/kernel.h:997:51: error: dereferencing pointer to incomplete type 'struct rq' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ include/linux/compiler.h:335:18: note: in definition of macro '__compiletime_assert' int __cond = !(condition); \ ^~~~~~~~~ include/linux/compiler.h:358:2: note: in expansion of macro '_compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:997:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:997:20: note: in expansion of macro '__same_type' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~ >> kernel/sched/sched.h:581:9: note: in expansion of macro 'container_of' return container_of(cfs_rq, struct rq, cfs); ^~~~~~~~~~~~ In file included from :0:0: >> include/linux/compiler_types.h:237:35: error: invalid use of undefined type 'struct rq' #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ^ include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof' #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:1000:21: note: in expansion of macro 'offsetof' ((type *)(__mptr - offsetof(type, member))); }) ^~~~~~~~ >> kernel/sched/sched.h:581:9: note: in expansion of macro 'container_of' return container_of(cfs_rq, struct rq, cfs); ^~~~~~~~~~~~ In file included from kernel/sched/fair.c:23:0: kernel/sched/sched.h:582:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ vim +/container_of +581 kernel/sched/sched.h 578 579 static inline struct rq *rq_of(struct cfs_rq *cfs_rq) 580 { > 581 return container_of(cfs_rq, struct rq, cfs); 582 } 583 #endif 584 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation