All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v1] bpf: Fix build when CONFIG_BPF_SYSCALL is disabled
@ 2021-11-10  1:00 Vinicius Costa Gomes
  2021-11-10  3:22   ` kernel test robot
  2021-11-10  3:59   ` kernel test robot
  0 siblings, 2 replies; 5+ messages in thread
From: Vinicius Costa Gomes @ 2021-11-10  1:00 UTC (permalink / raw)
  To: bpf
  Cc: Vinicius Costa Gomes, netdev, ast, daniel, memxor, kafai, andrii,
	songliubraving, yhs

When CONFIG_DEBUG_INFO_BTF is enabled and CONFIG_BPF_SYSCALL is
disabled, the following compilation error can be seen:

  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  AR      init/built-in.a
  LD      vmlinux.o
  MODPOST vmlinux.symvers
  MODINFO modules.builtin.modinfo
  GEN     modules.builtin
  LD      .tmp_vmlinux.btf
ld: net/ipv4/tcp_cubic.o: in function `cubictcp_unregister':
net/ipv4/tcp_cubic.c:545: undefined reference to `bpf_tcp_ca_kfunc_list'
ld: net/ipv4/tcp_cubic.c:545: undefined reference to `unregister_kfunc_btf_id_set'
ld: net/ipv4/tcp_cubic.o: in function `cubictcp_register':
net/ipv4/tcp_cubic.c:539: undefined reference to `bpf_tcp_ca_kfunc_list'
ld: net/ipv4/tcp_cubic.c:539: undefined reference to `register_kfunc_btf_id_set'
  BTF     .btf.vmlinux.bin.o
pahole: .tmp_vmlinux.btf: No such file or directory
  LD      .tmp_vmlinux.kallsyms1
.btf.vmlinux.bin.o: file not recognized: file format not recognized
make: *** [Makefile:1187: vmlinux] Error 1

'bpf_tcp_ca_kfunc_list', 'register_kfunc_btf_id_set()' and
'unregister_kfunc_btf_id_set()' are only defined when
CONFIG_BPF_SYSCALL is enabled.

Fix that by moving those definitions somewhere that doesn't depend on
the bpf() syscall.

Fixes: 14f267d95fe4 ("bpf: btf: Introduce helpers for dynamic BTF set registration")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
This is RFC-ish as I don't know enough about BPF/BTF. I could be missing something.

 kernel/bpf/btf.c  | 25 -------------------------
 kernel/bpf/core.c | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 25 deletions(-)

diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index dbc3ad07e21b..69dd2efd518f 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -6344,33 +6344,8 @@ const struct bpf_func_proto bpf_btf_find_by_name_kind_proto = {
 
 BTF_ID_LIST_GLOBAL_SINGLE(btf_task_struct_ids, struct, task_struct)
 
-/* BTF ID set registration API for modules */
-
-struct kfunc_btf_id_list {
-	struct list_head list;
-	struct mutex mutex;
-};
-
 #ifdef CONFIG_DEBUG_INFO_BTF_MODULES
 
-void register_kfunc_btf_id_set(struct kfunc_btf_id_list *l,
-			       struct kfunc_btf_id_set *s)
-{
-	mutex_lock(&l->mutex);
-	list_add(&s->list, &l->list);
-	mutex_unlock(&l->mutex);
-}
-EXPORT_SYMBOL_GPL(register_kfunc_btf_id_set);
-
-void unregister_kfunc_btf_id_set(struct kfunc_btf_id_list *l,
-				 struct kfunc_btf_id_set *s)
-{
-	mutex_lock(&l->mutex);
-	list_del_init(&s->list);
-	mutex_unlock(&l->mutex);
-}
-EXPORT_SYMBOL_GPL(unregister_kfunc_btf_id_set);
-
 bool bpf_check_mod_kfunc_call(struct kfunc_btf_id_list *klist, u32 kfunc_id,
 			      struct module *owner)
 {
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 327e3996eadb..4b2ad0fa0a4f 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -2449,6 +2449,43 @@ int __weak bpf_arch_text_poke(void *ip, enum bpf_text_poke_type t,
 DEFINE_STATIC_KEY_FALSE(bpf_stats_enabled_key);
 EXPORT_SYMBOL(bpf_stats_enabled_key);
 
+/* BTF ID set registration API for modules */
+
+struct kfunc_btf_id_list {
+	struct list_head list;
+	struct mutex mutex;
+};
+
+#ifdef CONFIG_DEBUG_INFO_BTF_MODULES
+
+void register_kfunc_btf_id_set(struct kfunc_btf_id_list *l,
+			       struct kfunc_btf_id_set *s)
+{
+	mutex_lock(&l->mutex);
+	list_add(&s->list, &l->list);
+	mutex_unlock(&l->mutex);
+}
+EXPORT_SYMBOL_GPL(register_kfunc_btf_id_set);
+
+void unregister_kfunc_btf_id_set(struct kfunc_btf_id_list *l,
+				 struct kfunc_btf_id_set *s)
+{
+	mutex_lock(&l->mutex);
+	list_del_init(&s->list);
+	mutex_unlock(&l->mutex);
+}
+EXPORT_SYMBOL_GPL(unregister_kfunc_btf_id_set);
+
+#endif
+
+#define DEFINE_KFUNC_BTF_ID_LIST(name)                                         \
+	struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
+					  __MUTEX_INITIALIZER(name.mutex) };   \
+	EXPORT_SYMBOL_GPL(name)
+
+DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
+DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
+
 /* All definitions of tracepoints related to BPF. */
 #define CREATE_TRACE_POINTS
 #include <linux/bpf_trace.h>
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net v1] bpf: Fix build when CONFIG_BPF_SYSCALL is disabled
  2021-11-10  1:00 [PATCH net v1] bpf: Fix build when CONFIG_BPF_SYSCALL is disabled Vinicius Costa Gomes
@ 2021-11-10  3:22   ` kernel test robot
  2021-11-10  3:59   ` kernel test robot
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-10  3:22 UTC (permalink / raw)
  To: Vinicius Costa Gomes, bpf
  Cc: kbuild-all, Vinicius Costa Gomes, netdev, ast, daniel, memxor,
	kafai, andrii, songliubraving, yhs

[-- Attachment #1: Type: text/plain, Size: 33514 bytes --]

Hi Vinicius,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Vinicius-Costa-Gomes/bpf-Fix-build-when-CONFIG_BPF_SYSCALL-is-disabled/20211110-090148
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git fceb07950a7aac43d52d8c6ef580399a8b9b68fe
config: i386-debian-10.3 (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/1e7a382c089da5714e4a9411765e84815cf550f9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vinicius-Costa-Gomes/bpf-Fix-build-when-CONFIG_BPF_SYSCALL-is-disabled/20211110-090148
        git checkout 1e7a382c089da5714e4a9411765e84815cf550f9
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   kernel/bpf/btf.c: In function 'btf_seq_show':
   kernel/bpf/btf.c:5876:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    5876 |  seq_vprintf((struct seq_file *)show->target, fmt, args);
         |                      ^~~~~~~~
   kernel/bpf/btf.c: In function 'btf_snprintf_show':
   kernel/bpf/btf.c:5913:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    5913 |  len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
         |  ^~~
   kernel/bpf/btf.c: At top level:
   kernel/bpf/btf.c:6370:9: error: variable 'bpf_tcp_ca_kfunc_list' has initializer but incomplete type
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |         ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/list.h:21:30: warning: excess elements in struct initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/mutex.h:109:3: error: extra brace group at end of initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/btf.h:6,
                    from kernel/bpf/btf.c:4:
   include/linux/types.h:170:24: error: extra brace group at end of initializer
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/types.h:170:24: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/mutex.h:109:3: warning: excess elements in struct initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:9: error: variable 'prog_test_kfunc_list' has initializer but incomplete type
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |         ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/list.h:21:30: warning: excess elements in struct initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/mutex.h:109:3: error: extra brace group at end of initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'prog_test_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/btf.h:6,
                    from kernel/bpf/btf.c:4:
   include/linux/types.h:170:24: error: extra brace group at end of initializer
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/types.h:170:24: note: (near initialization for 'prog_test_kfunc_list')
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/mutex.h:109:3: warning: excess elements in struct initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'prog_test_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:27,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   kernel/bpf/btf.c:6374:26: error: storage size of 'bpf_tcp_ca_kfunc_list' isn't known
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:26: error: storage size of 'bpf_tcp_ca_kfunc_list' isn't known
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:26: error: storage size of 'prog_test_kfunc_list' isn't known
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:26: error: storage size of 'prog_test_kfunc_list' isn't known
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~


vim +21 include/linux/list.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  10  
^1da177e4c3f41 Linus Torvalds 2005-04-16  11  /*
1eafe075bf9cb4 Asif Rasheed   2020-09-20  12   * Circular doubly linked list implementation.
^1da177e4c3f41 Linus Torvalds 2005-04-16  13   *
^1da177e4c3f41 Linus Torvalds 2005-04-16  14   * Some of the internal functions ("__xxx") are useful when
^1da177e4c3f41 Linus Torvalds 2005-04-16  15   * manipulating whole lists rather than single entries, as
^1da177e4c3f41 Linus Torvalds 2005-04-16  16   * sometimes we already know the next/prev entries and we can
^1da177e4c3f41 Linus Torvalds 2005-04-16  17   * generate better code by using them directly rather than
^1da177e4c3f41 Linus Torvalds 2005-04-16  18   * using the generic single-entry routines.
^1da177e4c3f41 Linus Torvalds 2005-04-16  19   */
^1da177e4c3f41 Linus Torvalds 2005-04-16  20  
^1da177e4c3f41 Linus Torvalds 2005-04-16 @21  #define LIST_HEAD_INIT(name) { &(name), &(name) }
^1da177e4c3f41 Linus Torvalds 2005-04-16  22  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34169 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net v1] bpf: Fix build when CONFIG_BPF_SYSCALL is disabled
@ 2021-11-10  3:22   ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-10  3:22 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 34076 bytes --]

Hi Vinicius,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Vinicius-Costa-Gomes/bpf-Fix-build-when-CONFIG_BPF_SYSCALL-is-disabled/20211110-090148
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git fceb07950a7aac43d52d8c6ef580399a8b9b68fe
config: i386-debian-10.3 (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/1e7a382c089da5714e4a9411765e84815cf550f9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vinicius-Costa-Gomes/bpf-Fix-build-when-CONFIG_BPF_SYSCALL-is-disabled/20211110-090148
        git checkout 1e7a382c089da5714e4a9411765e84815cf550f9
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   kernel/bpf/btf.c: In function 'btf_seq_show':
   kernel/bpf/btf.c:5876:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    5876 |  seq_vprintf((struct seq_file *)show->target, fmt, args);
         |                      ^~~~~~~~
   kernel/bpf/btf.c: In function 'btf_snprintf_show':
   kernel/bpf/btf.c:5913:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    5913 |  len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
         |  ^~~
   kernel/bpf/btf.c: At top level:
   kernel/bpf/btf.c:6370:9: error: variable 'bpf_tcp_ca_kfunc_list' has initializer but incomplete type
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |         ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/list.h:21:30: warning: excess elements in struct initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/mutex.h:109:3: error: extra brace group at end of initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/btf.h:6,
                    from kernel/bpf/btf.c:4:
   include/linux/types.h:170:24: error: extra brace group at end of initializer
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/types.h:170:24: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/mutex.h:109:3: warning: excess elements in struct initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:9: error: variable 'prog_test_kfunc_list' has initializer but incomplete type
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |         ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/list.h:21:30: warning: excess elements in struct initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/mutex.h:109:3: error: extra brace group at end of initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'prog_test_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/btf.h:6,
                    from kernel/bpf/btf.c:4:
   include/linux/types.h:170:24: error: extra brace group at end of initializer
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/types.h:170:24: note: (near initialization for 'prog_test_kfunc_list')
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/mutex.h:109:3: warning: excess elements in struct initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'prog_test_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:27,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   kernel/bpf/btf.c:6374:26: error: storage size of 'bpf_tcp_ca_kfunc_list' isn't known
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:26: error: storage size of 'bpf_tcp_ca_kfunc_list' isn't known
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:26: error: storage size of 'prog_test_kfunc_list' isn't known
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:26: error: storage size of 'prog_test_kfunc_list' isn't known
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~


vim +21 include/linux/list.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  10  
^1da177e4c3f41 Linus Torvalds 2005-04-16  11  /*
1eafe075bf9cb4 Asif Rasheed   2020-09-20  12   * Circular doubly linked list implementation.
^1da177e4c3f41 Linus Torvalds 2005-04-16  13   *
^1da177e4c3f41 Linus Torvalds 2005-04-16  14   * Some of the internal functions ("__xxx") are useful when
^1da177e4c3f41 Linus Torvalds 2005-04-16  15   * manipulating whole lists rather than single entries, as
^1da177e4c3f41 Linus Torvalds 2005-04-16  16   * sometimes we already know the next/prev entries and we can
^1da177e4c3f41 Linus Torvalds 2005-04-16  17   * generate better code by using them directly rather than
^1da177e4c3f41 Linus Torvalds 2005-04-16  18   * using the generic single-entry routines.
^1da177e4c3f41 Linus Torvalds 2005-04-16  19   */
^1da177e4c3f41 Linus Torvalds 2005-04-16  20  
^1da177e4c3f41 Linus Torvalds 2005-04-16 @21  #define LIST_HEAD_INIT(name) { &(name), &(name) }
^1da177e4c3f41 Linus Torvalds 2005-04-16  22  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34169 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net v1] bpf: Fix build when CONFIG_BPF_SYSCALL is disabled
  2021-11-10  1:00 [PATCH net v1] bpf: Fix build when CONFIG_BPF_SYSCALL is disabled Vinicius Costa Gomes
@ 2021-11-10  3:59   ` kernel test robot
  2021-11-10  3:59   ` kernel test robot
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-10  3:59 UTC (permalink / raw)
  To: Vinicius Costa Gomes, bpf
  Cc: kbuild-all, Vinicius Costa Gomes, netdev, ast, daniel, memxor,
	kafai, andrii, songliubraving, yhs

[-- Attachment #1: Type: text/plain, Size: 33305 bytes --]

Hi Vinicius,

I love your patch! Yet something to improve:

[auto build test ERROR on net/master]

url:    https://github.com/0day-ci/linux/commits/Vinicius-Costa-Gomes/bpf-Fix-build-when-CONFIG_BPF_SYSCALL-is-disabled/20211110-090148
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git fceb07950a7aac43d52d8c6ef580399a8b9b68fe
config: i386-debian-10.3 (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/1e7a382c089da5714e4a9411765e84815cf550f9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vinicius-Costa-Gomes/bpf-Fix-build-when-CONFIG_BPF_SYSCALL-is-disabled/20211110-090148
        git checkout 1e7a382c089da5714e4a9411765e84815cf550f9
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   kernel/bpf/btf.c: In function 'btf_seq_show':
   kernel/bpf/btf.c:5876:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    5876 |  seq_vprintf((struct seq_file *)show->target, fmt, args);
         |                      ^~~~~~~~
   kernel/bpf/btf.c: In function 'btf_snprintf_show':
   kernel/bpf/btf.c:5913:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    5913 |  len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
         |  ^~~
   kernel/bpf/btf.c: At top level:
>> kernel/bpf/btf.c:6370:9: error: variable 'bpf_tcp_ca_kfunc_list' has initializer but incomplete type
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |         ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: warning: excess elements in struct initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/mutex.h:109:3: error: extra brace group at end of initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/btf.h:6,
                    from kernel/bpf/btf.c:4:
>> include/linux/types.h:170:24: error: extra brace group at end of initializer
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/types.h:170:24: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/mutex.h:109:3: warning: excess elements in struct initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:9: error: variable 'prog_test_kfunc_list' has initializer but incomplete type
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |         ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: warning: excess elements in struct initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/mutex.h:109:3: error: extra brace group at end of initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'prog_test_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/btf.h:6,
                    from kernel/bpf/btf.c:4:
>> include/linux/types.h:170:24: error: extra brace group at end of initializer
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/types.h:170:24: note: (near initialization for 'prog_test_kfunc_list')
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/mutex.h:109:3: warning: excess elements in struct initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'prog_test_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:27,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> kernel/bpf/btf.c:6374:26: error: storage size of 'bpf_tcp_ca_kfunc_list' isn't known
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6374:26: error: storage size of 'bpf_tcp_ca_kfunc_list' isn't known
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6375:26: error: storage size of 'prog_test_kfunc_list' isn't known
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6375:26: error: storage size of 'prog_test_kfunc_list' isn't known
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/bpf_tcp_ca_kfunc_list +6370 kernel/bpf/btf.c

14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02  6368  
14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02  6369  #define DEFINE_KFUNC_BTF_ID_LIST(name)                                         \
14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02 @6370  	struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02 @6371  					  __MUTEX_INITIALIZER(name.mutex) };   \
14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02 @6372  	EXPORT_SYMBOL_GPL(name)
0e32dfc80bae53 Kumar Kartikeya Dwivedi 2021-10-02  6373  
0e32dfc80bae53 Kumar Kartikeya Dwivedi 2021-10-02 @6374  DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
c48e51c8b07aba Kumar Kartikeya Dwivedi 2021-10-02 @6375  DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34169 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net v1] bpf: Fix build when CONFIG_BPF_SYSCALL is disabled
@ 2021-11-10  3:59   ` kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-11-10  3:59 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 33862 bytes --]

Hi Vinicius,

I love your patch! Yet something to improve:

[auto build test ERROR on net/master]

url:    https://github.com/0day-ci/linux/commits/Vinicius-Costa-Gomes/bpf-Fix-build-when-CONFIG_BPF_SYSCALL-is-disabled/20211110-090148
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git fceb07950a7aac43d52d8c6ef580399a8b9b68fe
config: i386-debian-10.3 (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/1e7a382c089da5714e4a9411765e84815cf550f9
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vinicius-Costa-Gomes/bpf-Fix-build-when-CONFIG_BPF_SYSCALL-is-disabled/20211110-090148
        git checkout 1e7a382c089da5714e4a9411765e84815cf550f9
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   kernel/bpf/btf.c: In function 'btf_seq_show':
   kernel/bpf/btf.c:5876:22: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    5876 |  seq_vprintf((struct seq_file *)show->target, fmt, args);
         |                      ^~~~~~~~
   kernel/bpf/btf.c: In function 'btf_snprintf_show':
   kernel/bpf/btf.c:5913:2: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    5913 |  len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
         |  ^~~
   kernel/bpf/btf.c: At top level:
>> kernel/bpf/btf.c:6370:9: error: variable 'bpf_tcp_ca_kfunc_list' has initializer but incomplete type
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |         ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: warning: excess elements in struct initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/mutex.h:109:3: error: extra brace group at end of initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/btf.h:6,
                    from kernel/bpf/btf.c:4:
>> include/linux/types.h:170:24: error: extra brace group at end of initializer
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/types.h:170:24: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/mutex.h:109:3: warning: excess elements in struct initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'bpf_tcp_ca_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:9: error: variable 'prog_test_kfunc_list' has initializer but incomplete type
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |         ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6370:55: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                                       ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: warning: excess elements in struct initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   kernel/bpf/btf.c:6370:36: note: in expansion of macro 'LIST_HEAD_INIT'
    6370 |  struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
         |                                    ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/mutex.h:109:3: error: extra brace group at end of initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'prog_test_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/uapi/linux/btf.h:6,
                    from kernel/bpf/btf.c:4:
>> include/linux/types.h:170:24: error: extra brace group at end of initializer
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/types.h:170:24: note: (near initialization for 'prog_test_kfunc_list')
     170 | #define ATOMIC_INIT(i) { (i) }
         |                        ^
   include/linux/atomic/atomic-long.h:19:30: note: in expansion of macro 'ATOMIC_INIT'
      19 | #define ATOMIC_LONG_INIT(i)  ATOMIC_INIT(i)
         |                              ^~~~~~~~~~~
   include/linux/mutex.h:109:14: note: in expansion of macro 'ATOMIC_LONG_INIT'
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |              ^~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rculist.h:10,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> include/linux/list.h:21:30: error: extra brace group at end of initializer
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/list.h:21:30: note: (near initialization for 'prog_test_kfunc_list')
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                              ^
   include/linux/mutex.h:111:18: note: in expansion of macro 'LIST_HEAD_INIT'
     111 |   , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
         |                  ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:34: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                  ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6371:32: error: invalid use of undefined type 'struct kfunc_btf_id_list'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |                                ^
   include/linux/list.h:21:43: note: in definition of macro 'LIST_HEAD_INIT'
      21 | #define LIST_HEAD_INIT(name) { &(name), &(name) }
         |                                           ^~~~
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/rhashtable-types.h:14,
                    from include/linux/ipc.h:7,
                    from include/uapi/linux/sem.h:5,
                    from include/linux/sem.h:5,
                    from include/linux/sched.h:15,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
   include/linux/mutex.h:109:3: warning: excess elements in struct initializer
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mutex.h:109:3: note: (near initialization for 'prog_test_kfunc_list')
     109 |   { .owner = ATOMIC_LONG_INIT(0) \
         |   ^
   kernel/bpf/btf.c:6371:8: note: in expansion of macro '__MUTEX_INITIALIZER'
    6371 |        __MUTEX_INITIALIZER(name.mutex) };   \
         |        ^~~~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:27,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from include/linux/ptrace.h:6,
                    from include/uapi/asm-generic/bpf_perf_event.h:4,
                    from ./arch/x86/include/generated/uapi/asm/bpf_perf_event.h:1,
                    from include/uapi/linux/bpf_perf_event.h:11,
                    from kernel/bpf/btf.c:6:
>> kernel/bpf/btf.c:6374:26: error: storage size of 'bpf_tcp_ca_kfunc_list' isn't known
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6374:26: error: storage size of 'bpf_tcp_ca_kfunc_list' isn't known
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6374:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6374 | DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6375:26: error: storage size of 'prog_test_kfunc_list' isn't known
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/bpf/btf.c:6375:26: error: storage size of 'prog_test_kfunc_list' isn't known
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         |                          ^~~~~~~~~~~~~~~~~~~~
   include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                     ^~~
   include/linux/export.h:160:34: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:164:33: note: in expansion of macro '_EXPORT_SYMBOL'
     164 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   kernel/bpf/btf.c:6372:2: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
    6372 |  EXPORT_SYMBOL_GPL(name)
         |  ^~~~~~~~~~~~~~~~~
   kernel/bpf/btf.c:6375:1: note: in expansion of macro 'DEFINE_KFUNC_BTF_ID_LIST'
    6375 | DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);
         | ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/bpf_tcp_ca_kfunc_list +6370 kernel/bpf/btf.c

14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02  6368  
14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02  6369  #define DEFINE_KFUNC_BTF_ID_LIST(name)                                         \
14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02 @6370  	struct kfunc_btf_id_list name = { LIST_HEAD_INIT(name.list),           \
14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02 @6371  					  __MUTEX_INITIALIZER(name.mutex) };   \
14f267d95fe4b0 Kumar Kartikeya Dwivedi 2021-10-02 @6372  	EXPORT_SYMBOL_GPL(name)
0e32dfc80bae53 Kumar Kartikeya Dwivedi 2021-10-02  6373  
0e32dfc80bae53 Kumar Kartikeya Dwivedi 2021-10-02 @6374  DEFINE_KFUNC_BTF_ID_LIST(bpf_tcp_ca_kfunc_list);
c48e51c8b07aba Kumar Kartikeya Dwivedi 2021-10-02 @6375  DEFINE_KFUNC_BTF_ID_LIST(prog_test_kfunc_list);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34169 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-10  4:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10  1:00 [PATCH net v1] bpf: Fix build when CONFIG_BPF_SYSCALL is disabled Vinicius Costa Gomes
2021-11-10  3:22 ` kernel test robot
2021-11-10  3:22   ` kernel test robot
2021-11-10  3:59 ` kernel test robot
2021-11-10  3:59   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.