diff options
| author | JP Kobryn <jp.kobryn@linux.dev> | 2026-06-26 10:20:26 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-07-01 16:53:17 -0700 |
| commit | 0b58988cacfc91604c4b5be2c3295f8aac0ee3d0 (patch) | |
| tree | ac0a9562f3ee2aa3ada838e1456711c7e56c0c2a /drivers | |
| parent | d262a25d8b58b697b2a1a2fe4b0078446cc00e11 (diff) | |
| download | linux-next-0b58988cacfc91604c4b5be2c3295f8aac0ee3d0.tar.gz linux-next-0b58988cacfc91604c4b5be2c3295f8aac0ee3d0.zip | |
Documentation/bpf: make it clear that kfuncs should be non-static
The kfunc documentation mentions how the macro __bpf_kfunc prevents
inlining for static functions. This makes it sound like static kfuncs are
acceptable. Although static kfuncs may happen to work, it is by chance that
the compiler chose not to rename these functions and BTF resolution still
succeeds.
Make it clear in the documentation why kfuncs should not be declared
static. First, remove wording that makes it sound like static is ok. Then
point out the external naming needed for BTF resolution. Finally point out
that sparse may warn on unreferenced kfuncs and that this warning can be
ignored.
Signed-off-by: JP Kobryn <jp.kobryn@linux.dev>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260626172026.7327-1-jp.kobryn@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions
