Files
kernel_oneplus_sm8250/include/linux
Yonghong Song d99bd3d426 UPSTREAM: bpf: fix a compilation error when CONFIG_BPF_SYSCALL is not defined
Kernel test robot (lkp@intel.com) reports a compilation error at
  https://www.spinics.net/lists/netdev/msg534913.html
introduced by commit 838e96904ff3 ("bpf: Introduce bpf_func_info").

If CONFIG_BPF is defined and CONFIG_BPF_SYSCALL is not defined,
the following error will appear:
  kernel/bpf/core.c:414: undefined reference to `btf_type_by_id'
  kernel/bpf/core.c:415: undefined reference to `btf_name_by_offset'

When CONFIG_BPF_SYSCALL is not defined,
let us define stub inline functions for btf_type_by_id()
and btf_name_by_offset() in include/linux/btf.h.
This way, the compilation failure can be avoided.

Fixes: 838e96904ff3 ("bpf: Introduce bpf_func_info")
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Change-Id: I36eb14214637283d1429dc886c7612b04325e660
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-08-28 03:23:53 +03:00
..
2019-12-13 08:51:18 +01:00
2022-10-26 13:19:32 +02:00
2022-12-17 00:25:35 +02:00
2019-11-25 10:00:42 +01:00
2020-06-17 06:00:22 +05:30
2021-01-30 13:32:12 +01:00
2020-05-11 10:27:22 -07:00
2024-06-09 02:32:30 +03:00
2021-03-05 07:01:18 +01:00
2021-08-27 15:24:34 +02:00
2020-01-15 14:51:23 +00:00
2022-08-25 11:15:23 +02:00
2020-09-09 19:48:58 +02:00
2019-12-31 16:35:38 +01:00
2025-08-10 15:25:32 +03:00
2021-06-30 19:17:14 +02:00
2023-06-21 15:39:57 +02:00
2020-04-24 09:54:37 +05:30
2020-03-25 09:50:38 +01:00
2020-06-16 12:51:47 -07:00
2024-07-06 10:19:40 +00:00
2023-02-22 12:28:07 +00:00
2023-10-25 11:16:20 +02:00
2021-12-14 10:18:04 +01:00
2020-04-02 15:28:22 +02:00
2020-01-09 15:11:34 -08:00
2023-05-18 15:51:07 +00:00
2020-09-11 11:22:30 -07:00
2024-02-23 08:12:39 +01:00
2020-04-02 15:28:23 +02:00
2022-02-28 18:50:08 +05:30