# Re: \[PATCH bpf-next 2/2\] bpf: treewide: Annotate BPF kfuncs in BTF

- From: Daniel Xu \<hidden\>
- Date: 2024-01-05 02:38:11 
- List: netdev
- Page: https://ratatoskr.run/netdev/2024/01/2451405
- Thread: https://ratatoskr.run/linux-input/2024/01/2450184/t.md

```text
On Thu, Jan 04, 2024 at 06:17:50PM -0700, Daniel Xu wrote:
[...]
> > 
> > also given that we can have modules calling register_btf_kfunc_id_set,
> > should we just return error instead of the warn?
> 
> It looks like quite a few registrations go through late_initcall(),
> in which error codes are thrown away. I'm looking at
> init/main.c:do_initcall_level:
> 
>         for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++)
>                 do_one_initcall(initcall_from_entry(fn));
> 
> Higher level question: if out of tree module does not follow convention,
> it would still make sense to WARN(), right?

Ah, I got what you meant now. I'd say returning error makes sense but
WARN() is also useful. I'll send v2 with both.

[...]
```
