Hi Allen, Thank you for the patch! Yet something to improve: [auto build test ERROR on driver-core/driver-core-testing] [also build test ERROR on driver-core/driver-core-next driver-core/driver-core-linus mcgrof/modules-next usb/usb-testing usb/usb-next usb/usb-linus linus/master v6.1-rc7 next-20221129] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Allen-Webb/modules-add-modalias-file-to-sysfs-for-modules/20221129-041511 patch link: https://lore.kernel.org/r/20221128201332.3482092-1-allenwebb%40google.com patch subject: [PATCH] modules: add modalias file to sysfs for modules. config: arm-buildonly-randconfig-r003-20221128 compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/5f45459f50fc0240781c397065e1b7bafcc79e08 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Allen-Webb/modules-add-modalias-file-to-sysfs-for-modules/20221129-041511 git checkout 5f45459f50fc0240781c397065e1b7bafcc79e08 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/container_of.h:5, from include/linux/kernel.h:21, from kernel/params.c:6: kernel/module/internal.h: In function 'mod_find': >> include/linux/container_of.h:20:54: error: invalid use of undefined type 'struct module' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:20:23: note: in expansion of macro '__same_type' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ include/linux/rculist.h:307:9: note: in expansion of macro 'container_of' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~~~~ include/linux/rculist.h:391:20: note: in expansion of macro 'list_entry_rcu' 391 | pos = list_entry_rcu((head)->next, typeof(*pos), member); \ | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:298:27: error: expression in static assertion is not an integer 298 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:20:23: note: in expansion of macro '__same_type' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ include/linux/rculist.h:307:9: note: in expansion of macro 'container_of' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~~~~ include/linux/rculist.h:391:20: note: in expansion of macro 'list_entry_rcu' 391 | pos = list_entry_rcu((head)->next, typeof(*pos), member); \ | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from include/uapi/linux/posix_types.h:5, from include/uapi/linux/types.h:14, from include/linux/types.h:6, from include/linux/limits.h:6, from include/linux/kernel.h:16: >> include/linux/stddef.h:16:33: error: invalid use of undefined type 'struct module' 16 | #define offsetof(TYPE, MEMBER) __builtin_offsetof(TYPE, MEMBER) | ^~~~~~~~~~~~~~~~~~ include/linux/container_of.h:23:28: note: in expansion of macro 'offsetof' 23 | ((type *)(__mptr - offsetof(type, member))); }) | ^~~~~~~~ include/linux/rculist.h:307:9: note: in expansion of macro 'container_of' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~~~~ include/linux/rculist.h:391:20: note: in expansion of macro 'list_entry_rcu' 391 | pos = list_entry_rcu((head)->next, typeof(*pos), member); \ | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/pid.h:5, from include/linux/sched.h:14, from include/linux/sched/mm.h:7, from include/linux/xarray.h:19, from include/linux/radix-tree.h:21, from include/linux/idr.h:15, from include/linux/kernfs.h:12, from include/linux/sysfs.h:16, from include/linux/kobject.h:20, from include/linux/module.h:21, from kernel/params.c:9: >> include/linux/rculist.h:392:21: error: invalid use of undefined type 'struct module' 392 | &pos->member != (head); \ | ^~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~ include/linux/container_of.h:19:33: note: in definition of macro 'container_of' 19 | void *__mptr = (void *)(ptr); \ | ^~~ include/linux/compiler_types.h:345:9: note: in expansion of macro '__compiletime_assert' 345 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:357:9: note: in expansion of macro '_compiletime_assert' 357 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:307:22: note: in expansion of macro 'READ_ONCE' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~ include/linux/container_of.h:19:33: note: in definition of macro 'container_of' 19 | void *__mptr = (void *)(ptr); \ | ^~~ include/linux/compiler_types.h:345:9: note: in expansion of macro '__compiletime_assert' 345 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:357:9: note: in expansion of macro '_compiletime_assert' 357 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:307:22: note: in expansion of macro 'READ_ONCE' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~ include/linux/container_of.h:19:33: note: in definition of macro 'container_of' 19 | void *__mptr = (void *)(ptr); \ | ^~~ include/linux/compiler_types.h:345:9: note: in expansion of macro '__compiletime_assert' 345 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:357:9: note: in expansion of macro '_compiletime_assert' 357 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:307:22: note: in expansion of macro 'READ_ONCE' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~ include/linux/container_of.h:19:33: note: in definition of macro 'container_of' 19 | void *__mptr = (void *)(ptr); \ -- | ^~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:20:23: note: in expansion of macro '__same_type' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ include/linux/rculist.h:307:9: note: in expansion of macro 'container_of' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~~~~ include/linux/compiler_types.h:345:9: note: in expansion of macro '__compiletime_assert' 345 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:357:9: note: in expansion of macro '_compiletime_assert' 357 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:307:22: note: in expansion of macro 'READ_ONCE' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:20:23: note: in expansion of macro '__same_type' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ include/linux/rculist.h:307:9: note: in expansion of macro 'container_of' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~~~~ include/asm-generic/rwonce.h:44:43: note: in expansion of macro '__unqual_scalar_typeof' 44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x)) | ^~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ include/linux/rculist.h:307:22: note: in expansion of macro 'READ_ONCE' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:20:23: note: in expansion of macro '__same_type' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ include/linux/rculist.h:307:9: note: in expansion of macro 'container_of' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~~~~ include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE' 50 | __READ_ONCE(x); \ | ^~~~~~~~~~~ include/linux/rculist.h:307:22: note: in expansion of macro 'READ_ONCE' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/container_of.h:20:54: error: invalid use of undefined type 'struct module' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:20:23: note: in expansion of macro '__same_type' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~ include/linux/rculist.h:307:9: note: in expansion of macro 'container_of' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:21:23: note: in expansion of macro '__same_type' 21 | __same_type(*(ptr), void), \ | ^~~~~~~~~~~ include/linux/rculist.h:307:9: note: in expansion of macro 'container_of' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~~~~ include/linux/compiler_types.h:345:9: note: in expansion of macro '__compiletime_assert' 345 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:357:9: note: in expansion of macro '_compiletime_assert' 357 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:307:22: note: in expansion of macro 'READ_ONCE' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~ include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert' 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~ include/linux/container_of.h:20:9: note: in expansion of macro 'static_assert' 20 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \ | ^~~~~~~~~~~~~ include/linux/container_of.h:21:23: note: in expansion of macro '__same_type' 21 | __same_type(*(ptr), void), \ | ^~~~~~~~~~~ include/linux/rculist.h:307:9: note: in expansion of macro 'container_of' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~~~~ include/linux/compiler_types.h:345:9: note: in expansion of macro '__compiletime_assert' 345 | __compiletime_assert(condition, msg, prefix, suffix) | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:357:9: note: in expansion of macro '_compiletime_assert' 357 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~~~~~~ include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word' 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | ^~~~~~~~~~~~~ include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type' 49 | compiletime_assert_rwonce_type(x); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:307:22: note: in expansion of macro 'READ_ONCE' 307 | container_of(READ_ONCE(ptr), type, member) | ^~~~~~~~~ include/linux/rculist.h:393:23: note: in expansion of macro 'list_entry_rcu' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) | ^~~~~~~~~~~~~~ kernel/module/internal.h:212:9: note: in expansion of macro 'list_for_each_entry_rcu' 212 | list_for_each_entry_rcu(mod, &modules, list, | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/rculist.h:393:41: error: invalid use of undefined type 'struct module' 393 | pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) .. vim +20 include/linux/container_of.h d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 9 d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 10 /** d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 11 * container_of - cast a member of a structure out to the containing structure d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 12 * @ptr: the pointer to the member. d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 13 * @type: the type of the container struct this is embedded in. d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 14 * @member: the name of the member within the struct. d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 15 * 7376e561fd2e01 Sakari Ailus 2022-10-24 16 * WARNING: any const qualifier of @ptr is lost. d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 17 */ d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 18 #define container_of(ptr, type, member) ({ \ d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 19 void *__mptr = (void *)(ptr); \ e1edc277e6f6df Rasmus Villemoes 2021-11-08 @20 static_assert(__same_type(*(ptr), ((type *)0)->member) || \ e1edc277e6f6df Rasmus Villemoes 2021-11-08 21 __same_type(*(ptr), void), \ d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 22 "pointer type mismatch in container_of()"); \ d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 23 ((type *)(__mptr - offsetof(type, member))); }) d2a8ebbf8192b8 Andy Shevchenko 2021-11-08 24 -- 0-DAY CI Kernel Test Service https://01.org/lkp