Hi Florian, I love your patch! Yet something to improve: [auto build test ERROR on nf-next/master] url: https://github.com/0day-ci/linux/commits/Florian-Westphal/ipv6-remove-dependency-of-nf_defrag_ipv6-on-ipv6-module/20180713-064909 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: x86_64-fedora-25 (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): In file included from include/linux/kernel.h:10:0, from include/linux/list.h:9, from include/linux/random.h:10, from include/linux/net.h:22, from net/ieee802154/6lowpan/reassembly.c:17: net/ieee802154/6lowpan/reassembly.c: In function 'lowpan_frag_expire': >> include/linux/kernel.h:964:51: error: dereferencing pointer to incomplete type 'struct frag_queue' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert' bool __cond = !(condition); \ ^~~~~~~~~ include/linux/compiler.h:339: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:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:964:20: note: in expansion of macro '__same_type' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~ >> net/ieee802154/6lowpan/reassembly.c:57:7: note: in expansion of macro 'container_of' fq = container_of(frag, struct frag_queue, q); ^~~~~~~~~~~~ In file included from include/linux/compiler_types.h:58:0, from <command-line>:0: >> include/linux/compiler-gcc.h:170:2: error: invalid use of undefined type 'struct frag_queue' __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:967:21: note: in expansion of macro 'offsetof' ((type *)(__mptr - offsetof(type, member))); }) ^~~~~~~~ >> net/ieee802154/6lowpan/reassembly.c:57:7: note: in expansion of macro 'container_of' fq = container_of(frag, struct frag_queue, q); ^~~~~~~~~~~~ net/ieee802154/6lowpan/reassembly.c: In function 'lowpan_net_frag_init': >> net/ieee802154/6lowpan/reassembly.c:611:30: error: invalid application of 'sizeof' to incomplete type 'struct frag_queue' lowpan_frags.qsize = sizeof(struct frag_queue); ^~~~~~ -- In file included from include/linux/kernel.h:10:0, from include/linux/list.h:9, from include/linux/random.h:10, from include/linux/net.h:22, from net/ieee802154//6lowpan/reassembly.c:17: net/ieee802154//6lowpan/reassembly.c: In function 'lowpan_frag_expire': >> include/linux/kernel.h:964:51: error: dereferencing pointer to incomplete type 'struct frag_queue' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ include/linux/compiler.h:316:19: note: in definition of macro '__compiletime_assert' bool __cond = !(condition); \ ^~~~~~~~~ include/linux/compiler.h:339: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:964:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:964:20: note: in expansion of macro '__same_type' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^~~~~~~~~~~ net/ieee802154//6lowpan/reassembly.c:57:7: note: in expansion of macro 'container_of' fq = container_of(frag, struct frag_queue, q); ^~~~~~~~~~~~ In file included from include/linux/compiler_types.h:58:0, from <command-line>:0: >> include/linux/compiler-gcc.h:170:2: error: invalid use of undefined type 'struct frag_queue' __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:967:21: note: in expansion of macro 'offsetof' ((type *)(__mptr - offsetof(type, member))); }) ^~~~~~~~ net/ieee802154//6lowpan/reassembly.c:57:7: note: in expansion of macro 'container_of' fq = container_of(frag, struct frag_queue, q); ^~~~~~~~~~~~ net/ieee802154//6lowpan/reassembly.c: In function 'lowpan_net_frag_init': net/ieee802154//6lowpan/reassembly.c:611:30: error: invalid application of 'sizeof' to incomplete type 'struct frag_queue' lowpan_frags.qsize = sizeof(struct frag_queue); ^~~~~~ vim +964 include/linux/kernel.h cf14f27f Alexei Starovoitov 2018-03-28 954 ^1da177e Linus Torvalds 2005-04-16 955 /** ^1da177e Linus Torvalds 2005-04-16 956 * container_of - cast a member of a structure out to the containing structure ^1da177e Linus Torvalds 2005-04-16 957 * @ptr: the pointer to the member. ^1da177e Linus Torvalds 2005-04-16 958 * @type: the type of the container struct this is embedded in. ^1da177e Linus Torvalds 2005-04-16 959 * @member: the name of the member within the struct. ^1da177e Linus Torvalds 2005-04-16 960 * ^1da177e Linus Torvalds 2005-04-16 961 */ ^1da177e Linus Torvalds 2005-04-16 962 #define container_of(ptr, type, member) ({ \ c7acec71 Ian Abbott 2017-07-12 963 void *__mptr = (void *)(ptr); \ c7acec71 Ian Abbott 2017-07-12 @964 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ c7acec71 Ian Abbott 2017-07-12 965 !__same_type(*(ptr), void), \ c7acec71 Ian Abbott 2017-07-12 966 "pointer type mismatch in container_of()"); \ c7acec71 Ian Abbott 2017-07-12 967 ((type *)(__mptr - offsetof(type, member))); }) ^1da177e Linus Torvalds 2005-04-16 968 :::::: The code at line 964 was first introduced by commit :::::: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of() :::::: TO: Ian Abbott <abbotti@xxxxxxxxx> :::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip