From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0533482008834644946==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH 04/12] module: Move latched RB-tree support to a separate file Date: Wed, 29 Dec 2021 08:10:03 +0800 Message-ID: <202112290804.sntYFDL7-lkp@intel.com> In-Reply-To: <20211228213041.1356334-5-atomlin@redhat.com> List-Id: --===============0533482008834644946== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Aaron, [FYI, it's a private test report for your RFC patch.] [auto build test ERROR on jeyu/modules-next] [also build test ERROR on v5.16-rc7 next-20211224] [cannot apply to linus/master] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Aaron-Tomlin/module-Move-a= ll-into-module/20211229-063051 base: https://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modu= les-next config: riscv-randconfig-r022-20211229 (https://download.01.org/0day-ci/arc= hive/20211229/202112290804.sntYFDL7-lkp(a)intel.com/config) compiler: riscv32-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/0day-ci/linux/commit/dd28c799193d8a45ed7179108= 83b4c0b335774fe git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Aaron-Tomlin/module-Move-all-into-= module/20211229-063051 git checkout dd28c799193d8a45ed717910883b4c0b335774fe # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Driscv SHELL=3D/bin/bash kernel/module/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from : kernel/module/tree_lookup.c: In function '__mod_tree_val': >> include/linux/kernel.h:495:58: error: invalid use of undefined type 'str= uct module_layout' 495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->membe= r) && \ | ^~ include/linux/compiler_types.h:308:23: note: in definition of macro '__c= ompiletime_assert' 308 | if (!(condition)) = \ | ^~~~~~~~~ include/linux/compiler_types.h:328:9: note: in expansion of macro '_comp= iletime_assert' 328 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletim= e_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) | ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:495:9: note: in expansion of macro 'BUILD_BUG_ON_= MSG' 495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->membe= r) && \ | ^~~~~~~~~~~~~~~~ include/linux/kernel.h:495:27: note: in expansion of macro '__same_type' 495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->membe= r) && \ | ^~~~~~~~~~~ kernel/module/tree_lookup.c:23:40: note: in expansion of macro 'containe= r_of' 23 | struct module_layout *layout =3D container_of(n, struct = module_layout, mtn.node); | ^~~~~~~~~~~~ include/linux/compiler_types.h:140:41: error: invalid use of undefined t= ype 'struct module_layout' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/stddef.h:17:33: note: in expansion of macro '__compiler_of= fsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:498:28: note: in expansion of macro 'offsetof' 498 | ((type *)(__mptr - offsetof(type, member))); }) | ^~~~~~~~ kernel/module/tree_lookup.c:23:40: note: in expansion of macro 'containe= r_of' 23 | struct module_layout *layout =3D container_of(n, struct = module_layout, mtn.node); | ^~~~~~~~~~~~ >> kernel/module/tree_lookup.c:25:37: error: invalid use of undefined type = 'struct module_layout' 25 | return (unsigned long)layout->base; | ^~ In file included from : kernel/module/tree_lookup.c: In function '__mod_tree_size': >> include/linux/kernel.h:495:58: error: invalid use of undefined type 'str= uct module_layout' 495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->membe= r) && \ | ^~ include/linux/compiler_types.h:308:23: note: in definition of macro '__c= ompiletime_assert' 308 | if (!(condition)) = \ | ^~~~~~~~~ include/linux/compiler_types.h:328:9: note: in expansion of macro '_comp= iletime_assert' 328 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletim= e_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) | ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:495:9: note: in expansion of macro 'BUILD_BUG_ON_= MSG' 495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->membe= r) && \ | ^~~~~~~~~~~~~~~~ include/linux/kernel.h:495:27: note: in expansion of macro '__same_type' 495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->membe= r) && \ | ^~~~~~~~~~~ kernel/module/tree_lookup.c:30:40: note: in expansion of macro 'containe= r_of' 30 | struct module_layout *layout =3D container_of(n, struct = module_layout, mtn.node); | ^~~~~~~~~~~~ include/linux/compiler_types.h:140:41: error: invalid use of undefined t= ype 'struct module_layout' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/stddef.h:17:33: note: in expansion of macro '__compiler_of= fsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:498:28: note: in expansion of macro 'offsetof' 498 | ((type *)(__mptr - offsetof(type, member))); }) | ^~~~~~~~ kernel/module/tree_lookup.c:30:40: note: in expansion of macro 'containe= r_of' 30 | struct module_layout *layout =3D container_of(n, struct = module_layout, mtn.node); | ^~~~~~~~~~~~ kernel/module/tree_lookup.c:32:37: error: invalid use of undefined type = 'struct module_layout' 32 | return (unsigned long)layout->size; | ^~ kernel/module/tree_lookup.c: At top level: kernel/module/tree_lookup.c:63:40: warning: 'struct mod_tree_node' decla= red inside parameter list will not be visible outside of this definition or= declaration 63 | noinline void __mod_tree_insert(struct mod_tree_node *node) | ^~~~~~~~~~~~~ kernel/module/tree_lookup.c:63:15: warning: no previous prototype for '_= _mod_tree_insert' [-Wmissing-prototypes] 63 | noinline void __mod_tree_insert(struct mod_tree_node *node) | ^~~~~~~~~~~~~~~~~ kernel/module/tree_lookup.c: In function '__mod_tree_insert': >> kernel/module/tree_lookup.c:65:32: error: invalid use of undefined type = 'struct mod_tree_node' 65 | latch_tree_insert(&node->node, &mod_tree.root, &mod_tree= _ops); | ^~ kernel/module/tree_lookup.c:65:41: error: 'mod_tree' undeclared (first u= se in this function); did you mean 'mod_timer'? 65 | latch_tree_insert(&node->node, &mod_tree.root, &mod_tree= _ops); | ^~~~~~~~ | mod_timer kernel/module/tree_lookup.c:65:41: note: each undeclared identifier is r= eported only once for each function it appears in kernel/module/tree_lookup.c: At top level: kernel/module/tree_lookup.c:68:31: warning: 'struct mod_tree_node' decla= red inside parameter list will not be visible outside of this definition or= declaration 68 | void __mod_tree_remove(struct mod_tree_node *node) | ^~~~~~~~~~~~~ kernel/module/tree_lookup.c:68:6: warning: no previous prototype for '__= mod_tree_remove' [-Wmissing-prototypes] 68 | void __mod_tree_remove(struct mod_tree_node *node) | ^~~~~~~~~~~~~~~~~ kernel/module/tree_lookup.c: In function '__mod_tree_remove': kernel/module/tree_lookup.c:70:31: error: invalid use of undefined type = 'struct mod_tree_node' 70 | latch_tree_erase(&node->node, &mod_tree.root, &mod_tree_= ops); | ^~ kernel/module/tree_lookup.c:70:40: error: 'mod_tree' undeclared (first u= se in this function); did you mean 'mod_timer'? 70 | latch_tree_erase(&node->node, &mod_tree.root, &mod_tree_= ops); | ^~~~~~~~ | mod_timer kernel/module/tree_lookup.c: At top level: kernel/module/tree_lookup.c:77:6: warning: no previous prototype for 'mo= d_tree_insert' [-Wmissing-prototypes] 77 | void mod_tree_insert(struct module *mod) | ^~~~~~~~~~~~~~~ kernel/module/tree_lookup.c: In function 'mod_tree_insert': >> kernel/module/tree_lookup.c:79:12: error: invalid use of undefined type = 'struct module' 79 | mod->core_layout.mtn.mod =3D mod; | ^~ kernel/module/tree_lookup.c:80:12: error: invalid use of undefined type = 'struct module' 80 | mod->init_layout.mtn.mod =3D mod; | ^~ kernel/module/tree_lookup.c:82:31: error: invalid use of undefined type = 'struct module' 82 | __mod_tree_insert(&mod->core_layout.mtn); | ^~ kernel/module/tree_lookup.c:83:16: error: invalid use of undefined type = 'struct module' 83 | if (mod->init_layout.size) | ^~ kernel/module/tree_lookup.c:84:39: error: invalid use of undefined type = 'struct module' 84 | __mod_tree_insert(&mod->init_layout.mtn); | ^~ kernel/module/tree_lookup.c: At top level: kernel/module/tree_lookup.c:87:6: warning: no previous prototype for 'mo= d_tree_remove_init' [-Wmissing-prototypes] 87 | void mod_tree_remove_init(struct module *mod) | ^~~~~~~~~~~~~~~~~~~~ kernel/module/tree_lookup.c: In function 'mod_tree_remove_init': kernel/module/tree_lookup.c:89:16: error: invalid use of undefined type = 'struct module' 89 | if (mod->init_layout.size) | ^~ kernel/module/tree_lookup.c:90:39: error: invalid use of undefined type = 'struct module' 90 | __mod_tree_remove(&mod->init_layout.mtn); | ^~ kernel/module/tree_lookup.c: At top level: kernel/module/tree_lookup.c:93:6: warning: no previous prototype for 'mo= d_tree_remove' [-Wmissing-prototypes] 93 | void mod_tree_remove(struct module *mod) | ^~~~~~~~~~~~~~~ kernel/module/tree_lookup.c: In function 'mod_tree_remove': kernel/module/tree_lookup.c:95:31: error: invalid use of undefined type = 'struct module' 95 | __mod_tree_remove(&mod->core_layout.mtn); | ^~ kernel/module/tree_lookup.c: At top level: kernel/module/tree_lookup.c:99:16: warning: no previous prototype for 'm= od_find' [-Wmissing-prototypes] 99 | struct module *mod_find(unsigned long addr) | ^~~~~~~~ kernel/module/tree_lookup.c: In function 'mod_find': kernel/module/tree_lookup.c:103:46: error: 'mod_tree' undeclared (first = use in this function); did you mean 'mod_timer'? 103 | ltn =3D latch_tree_find((void *)addr, &mod_tree.root, &m= od_tree_ops); | ^~~~~~~~ | mod_timer In file included from : >> include/linux/kernel.h:495:58: error: invalid use of undefined type 'str= uct mod_tree_node' 495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->membe= r) && \ | ^~ include/linux/compiler_types.h:308:23: note: in definition of macro '__c= ompiletime_assert' 308 | if (!(condition)) = \ | ^~~~~~~~~ include/linux/compiler_types.h:328:9: note: in expansion of macro '_comp= iletime_assert' 328 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletim= e_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) | ^~~~~~~~~~~~~~~~~~ include/linux/kernel.h:495:9: note: in expansion of macro 'BUILD_BUG_ON_= MSG' 495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->membe= r) && \ | ^~~~~~~~~~~~~~~~ include/linux/kernel.h:495:27: note: in expansion of macro '__same_type' 495 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->membe= r) && \ | ^~~~~~~~~~~ kernel/module/tree_lookup.c:107:16: note: in expansion of macro 'contain= er_of' 107 | return container_of(ltn, struct mod_tree_node, node)->mo= d; | ^~~~~~~~~~~~ include/linux/compiler_types.h:140:41: error: invalid use of undefined t= ype 'struct mod_tree_node' 140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ^~~~~~~~~~~~~~~~~~ include/linux/stddef.h:17:33: note: in expansion of macro '__compiler_of= fsetof' 17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:498:28: note: in expansion of macro 'offsetof' 498 | ((type *)(__mptr - offsetof(type, member))); }) | ^~~~~~~~ kernel/module/tree_lookup.c:107:16: note: in expansion of macro 'contain= er_of' 107 | return container_of(ltn, struct mod_tree_node, node)->mo= d; | ^~~~~~~~~~~~ kernel/module/tree_lookup.c: In function '__mod_tree_val': kernel/module/tree_lookup.c:26:1: error: control reaches end of non-void= function [-Werror=3Dreturn-type] 26 | } | ^ kernel/module/tree_lookup.c: In function '__mod_tree_size': kernel/module/tree_lookup.c:33:1: error: control reaches end of non-void= function [-Werror=3Dreturn-type] 33 | } | ^ kernel/module/tree_lookup.c: In function 'mod_find': kernel/module/tree_lookup.c:108:1: error: control reaches end of non-voi= d function [-Werror=3Dreturn-type] 108 | } | ^ cc1: some warnings being treated as errors vim +495 include/linux/kernel.h cf14f27f82af78 Alexei Starovoitov 2018-03-28 485 = ^1da177e4c3f41 Linus Torvalds 2005-04-16 486 /** ^1da177e4c3f41 Linus Torvalds 2005-04-16 487 * container_of - cast a= member of a structure out to the containing structure ^1da177e4c3f41 Linus Torvalds 2005-04-16 488 * @ptr: the pointer to = the member. ^1da177e4c3f41 Linus Torvalds 2005-04-16 489 * @type: the type of th= e container struct this is embedded in. ^1da177e4c3f41 Linus Torvalds 2005-04-16 490 * @member: the name of = the member within the struct. ^1da177e4c3f41 Linus Torvalds 2005-04-16 491 * ^1da177e4c3f41 Linus Torvalds 2005-04-16 492 */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 493 #define container_of(ptr= , type, member) ({ \ c7acec713d14c6 Ian Abbott 2017-07-12 494 void *__mptr =3D (void = *)(ptr); \ c7acec713d14c6 Ian Abbott 2017-07-12 @495 BUILD_BUG_ON_MSG(!__sam= e_type(*(ptr), ((type *)0)->member) && \ c7acec713d14c6 Ian Abbott 2017-07-12 496 !__same_type(*(ptr),= void), \ c7acec713d14c6 Ian Abbott 2017-07-12 497 "pointer type mismat= ch in container_of()"); \ c7acec713d14c6 Ian Abbott 2017-07-12 498 ((type *)(__mptr - offs= etof(type, member))); }) ^1da177e4c3f41 Linus Torvalds 2005-04-16 499 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============0533482008834644946==--