Hi Hou,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf/master]
[also build test WARNING on v5.15-rc1 next-20210915]
[cannot apply to bpf-next/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/Hou-Tao/introduce-dummy-BPF-STRU...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
config: i386-randconfig-a016-20210916 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/0day-ci/linux/commit/3eeddb24d6b805983fd6147abf5bcaa65...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Hou-Tao/introduce-dummy-BPF-STRUCT_OPS/20210915-112614
git checkout 3eeddb24d6b805983fd6147abf5bcaa65091ab2b
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from kernel/bpf/bpf_dummy_struct_ops.c:10:
include/linux/bpf_dummy_ops.h:23:24: error: stray '\357' in program
23 | struct bpf_dummy_ops {};
| ^
include/linux/bpf_dummy_ops.h:23:25: error: stray '\274' in program
23 | struct bpf_dummy_ops {};
| ^
include/linux/bpf_dummy_ops.h:23:26: error: stray '\233' in program
23 | struct bpf_dummy_ops {};
| ^
> include/linux/bpf_dummy_ops.h:24:1: warning: 'static' is
not at beginning of declaration [-Wold-style-declaration]
24 | static inline
struct bpf_dummy_ops *bpf_get_dummy_ops(void) { return NULL; }
| ^~~~~~
> include/linux/bpf_dummy_ops.h:24:1: warning: 'inline' is
not at beginning of declaration [-Wold-style-declaration]
include/linux/bpf_dummy_ops.h:24:15: error: expected ';', identifier or
'(' before 'struct'
24 | static inline struct bpf_dummy_ops *bpf_get_dummy_ops(void) { return NULL; }
| ^~~~~~
include/linux/bpf_dummy_ops.h:24:15: error: 'inline' in empty declaration
> include/linux/bpf_dummy_ops.h:24:37: warning: no previous
prototype for 'bpf_get_dummy_ops' [-Wmissing-prototypes]
24 | static
inline struct bpf_dummy_ops *bpf_get_dummy_ops(void) { return NULL; }
| ^~~~~~~~~~~~~~~~~
kernel/bpf/bpf_dummy_struct_ops.c:17:23: error: redefinition of
'bpf_get_dummy_ops'
17 | struct bpf_dummy_ops *bpf_get_dummy_ops(void)
| ^~~~~~~~~~~~~~~~~
In file included from kernel/bpf/bpf_dummy_struct_ops.c:10:
include/linux/bpf_dummy_ops.h:24:37: note: previous definition of
'bpf_get_dummy_ops' was here
24 | static inline struct bpf_dummy_ops *bpf_get_dummy_ops(void) { return NULL; }
| ^~~~~~~~~~~~~~~~~
kernel/bpf/bpf_dummy_struct_ops.c: In function 'bpf_get_dummy_ops':
kernel/bpf/bpf_dummy_struct_ops.c:23:41: error: 'struct bpf_dummy_ops' has no
member named 'owner'
23 | if (ops && !bpf_try_module_get(ops, ops->owner))
| ^~
kernel/bpf/bpf_dummy_struct_ops.c: At top level:
kernel/bpf/bpf_dummy_struct_ops.c:31:6: error: redefinition of
'bpf_put_dummy_ops'
31 | void bpf_put_dummy_ops(struct bpf_dummy_ops *ops)
| ^~~~~~~~~~~~~~~~~
In file included from kernel/bpf/bpf_dummy_struct_ops.c:10:
include/linux/bpf_dummy_ops.h:25:20: note: previous definition of
'bpf_put_dummy_ops' was here
25 | static inline void bpf_put_dummy_ops(struct bpf_dummy_ops *ops) {}
| ^~~~~~~~~~~~~~~~~
kernel/bpf/bpf_dummy_struct_ops.c: In function 'bpf_put_dummy_ops':
kernel/bpf/bpf_dummy_struct_ops.c:33:25: error: 'struct bpf_dummy_ops' has no
member named 'owner'
33 | bpf_module_put(ops, ops->owner);
| ^~
In file included from <command-line>:
kernel/bpf/bpf_dummy_struct_ops.c: In function
'bpf_dummy_ops_btf_struct_access':
include/linux/compiler_types.h:140:35: error: invalid use of undefined type 'struct
bpf_dummy_ops_state'
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)
| ^~~~~~~~~~~~~~~~~~~
kernel/bpf/bpf_dummy_struct_ops.c:97:7: note: in expansion of macro 'offsetof'
97 | case offsetof(struct bpf_dummy_ops_state, val):
| ^~~~~~~~
include/linux/compiler_types.h:140:35: error: invalid use of undefined type 'struct
bpf_dummy_ops_state'
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/stddef.h:37:3: note: in expansion of macro 'offsetof'
37 | (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
| ^~~~~~~~
kernel/bpf/bpf_dummy_struct_ops.c:98:9: note: in expansion of macro
'offsetofend'
98 | end = offsetofend(struct bpf_dummy_ops_state, val);
| ^~~~~~~~~~~
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:7,
from kernel/bpf/bpf_dummy_struct_ops.c:5:
include/linux/stddef.h:28:55: error: dereferencing pointer to incomplete type
'struct bpf_dummy_ops_state'
28 | #define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
| ^~
include/linux/stddef.h:37:28: note: in expansion of macro 'sizeof_field'
37 | (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
| ^~~~~~~~~~~~
kernel/bpf/bpf_dummy_struct_ops.c:98:9: note: in expansion of macro
'offsetofend'
98 | end = offsetofend(struct bpf_dummy_ops_state, val);
| ^~~~~~~~~~~
vim +/static +24 include/linux/bpf_dummy_ops.h
19
20 extern struct bpf_dummy_ops *bpf_get_dummy_ops(void);
21 extern void bpf_put_dummy_ops(struct bpf_dummy_ops *ops);
22 #else
23 struct bpf_dummy_ops {};
24 static inline struct bpf_dummy_ops *bpf_get_dummy_ops(void) {
return NULL; }
25 static inline void bpf_put_dummy_ops(struct bpf_dummy_ops
*ops) {}
26 #endif
27
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org