On 07/12, Andrii Nakryiko wrote: > For all these years libbpf's BTF dumper has been emitting not strictly > valid syntax for function prototypes that have no input arguments. > > Instead of `int (*blah)()` we should emit `int (*blah)(void)`. > > This is not normally a problem, but it manifests when we get kfuncs in > vmlinux.h that have no input arguments. Due to compiler internal > specifics, we get no BTF information for such kfuncs, if they are not > declared with proper `(void)`. > > The fix is trivial. We also need to adjust a few ancient tests that > happily assumed `()` is correct. > > Reported-by: Tejun Heo <tj@xxxxxxxxxx> > Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion") > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxxx>