bpf: Always return corresponding btf_type in __get_type_size()
authorYonghong Song <yhs@fb.com>
Sun, 7 Aug 2022 17:51:16 +0000 (10:51 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 9 Aug 2022 17:30:45 +0000 (10:30 -0700)
commita00ed8430199abbc9d9bf43ea31795bfe98998ca
tree696ad86a479b12120fdf4a3a26a840da5591ff59
parent11b9148590146ff8a4e90c7f0186efe06009ec1b
bpf: Always return corresponding btf_type in __get_type_size()

Currently in funciton __get_type_size(), the corresponding
btf_type is returned only in invalid cases. Let us always
return btf_type regardless of valid or invalid cases.
Such a new functionality will be used in subsequent patches.

Signed-off-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20220807175116.4179242-1-yhs@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/btf.c