libbpf: fix some typo of hashmap init
PATCH v2 2/2 libbpf: fix some typo of hashmap init
Remove the whole HASHMAP_INIT. It's not used anywhere in libbpf.
--- tools/lib/bpf/hashmap.h | 10 ---------- 1 file changed, 10 deletions(-)
tools/lib/bpf/hashmap.h +0 -10
@@ -80,16 +80,6 @@ struct hashmap {size_t sz; }; -#define HASHMAP_INIT (_hash_fn, _equal_fn, _ctx) { \ - .hash_fn = (_hash_fn), \ - .equal_fn = (_equal_fn), \ - .ctx = (_ctx), \ - .buckets = NULL, \ - .cap = 0, \ - .cap_bits = 0, \ - .sz = 0, \ -} -void hashmap__init (struct hashmap *map,hashmap_hash_fn hash_fn,hashmap_equal_fn equal_fn,void *ctx); struct hashmap *hashmap__new(hashmap_hash_fn hash_fn,
Signature · 1 line
2.40.1
Quoted 3 lines · John Sanpe
Remove the whole
HASHMAP_INIT. It's not used anywhere in libbpf.Signed-off-by John Sanpe <[email protected]>
Doesn't look like it was ever used.
Quoted 9 lines · Stanislav Fomichev
Quoted 3 lines · John Sanpe
Remove the whole
HASHMAP_INIT. It's not used anywhere in libbpf.Signed-off-by John Sanpe <[email protected]>Doesn't look like it was ever used.
Ack for the change, but the subject doesn't correspond to the change itself. You are not fixing typo, you are removing static initialization helper.
Quoted 11 lines · Andrii Nakryiko
Quoted 7 lines · Stanislav Fomichev
Quoted 3 lines · John Sanpe
Remove the whole
HASHMAP_INIT. It's not used anywhere in libbpf.Signed-off-by John Sanpe<[email protected]>Doesn't look like it was ever used.
Ack for the change, but the subject doesn't correspond to the change itself. You are not fixing typo, you are removing static initialization helper.
Thanks for your suggestion, I have merged the two commits and used a more reasonable subject in v3: