diff options
| author | Ihor Solodrai <ihor.solodrai@linux.dev> | 2026-08-28 14:52:07 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-08-29 18:27:00 -0700 |
| commit | ff01f88a91368c264efb071c13f2b27b4d5c1d2b (patch) | |
| tree | bee18b3c57a19dba7695abeb25f017c9dd83fd85 /tools/lib/python/kdoc/python_version.py | |
| parent | 438147f7f60104a228fb506352bc8bbae53b1efd (diff) | |
| download | linux-next-ff01f88a91368c264efb071c13f2b27b4d5c1d2b.tar.gz linux-next-ff01f88a91368c264efb071c13f2b27b4d5c1d2b.zip | |
bpftool: Don't drop a type in the sorted C dump
The C dump sorts types by default, so that generated headers are
diffable. The sorted dump emits one type fewer than the unsorted dump
of the same BTF.
dump_btf_c() starts its loop at index 1 to skip the void type at BTF
type ID 0. That holds for the unsorted dump, where the array index is
the type ID, but not after qsort(): position 0 is then the lowest
ranked type, and btf_type_rank() ranks an anonymous enum 0 while void
takes the default rank of 10. So the enum is skipped, and void is
emitted instead as a no-op.
Fixes: 94133cf24bb3 ("bpftool: Introduce btf c dump sorting")
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260828215207.3105313-7-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
