projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2502e74
)
tools/resolve_btfids: Switch to new btf__type_cnt API
author
Hengqi Chen
<hengqi.chen@gmail.com>
Fri, 22 Oct 2021 13:06:21 +0000
(21:06 +0800)
committer
Andrii Nakryiko
<andrii@kernel.org>
Fri, 22 Oct 2021 23:09:14 +0000
(16:09 -0700)
Replace the call to btf__get_nr_types with new API btf__type_cnt.
The old API will be deprecated in libbpf v0.7+. No functionality
change.
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link:
https://lore.kernel.org/bpf/20211022130623.1548429-4-hengqi.chen@gmail.com
tools/bpf/resolve_btfids/main.c
patch
|
blob
|
history
diff --git
a/tools/bpf/resolve_btfids/main.c
b/tools/bpf/resolve_btfids/main.c
index
716e6ad
..
a59cb0e
100644
(file)
--- a/
tools/bpf/resolve_btfids/main.c
+++ b/
tools/bpf/resolve_btfids/main.c
@@
-502,12
+502,12
@@
static int symbols_resolve(struct object *obj)
}
err = -1;
- nr_types = btf__
get_nr_types
(btf);
+ nr_types = btf__
type_cnt
(btf);
/*
* Iterate all the BTF types and search for collected symbol IDs.
*/
- for (type_id = 1; type_id <
=
nr_types; type_id++) {
+ for (type_id = 1; type_id < nr_types; type_id++) {
const struct btf_type *type;
struct rb_root *root;
struct btf_id *id;