Skip to contentSkip to conversation

libbpf: Remove duplicate assignments

PATCH In review Mehrdad Arshad Rad 2 participants 2 messages Nov 27, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libbpf: Remove duplicate assignments

There is a same action when load_attr.attach_btf_id is initialized.

---
 tools/lib/bpf/libbpf.c | 1 -
 1 file changed, 1 deletion(-)
tools/lib/bpf/libbpf.c +0 -1
index 7c74342bb668..561bb97f25d6 100644
@@ -6445,7 +6445,6 @@ load_program(struct bpf_program *prog, struct bpf_insn *insns, int insns_cnt,
 	load_attr.attach_btf_id = prog->attach_btf_id;
 	load_attr.attach_prog_fd = prog->attach_prog_fd;
 	load_attr.attach_btf_obj_fd = prog->attach_btf_obj_fd;
-	load_attr.attach_btf_id = prog->attach_btf_id;
 	load_attr.kern_version = kern_version;
 	load_attr.prog_ifindex = prog->prog_ifindex;
 
Signature · 1 line
2.33.1
reviewer
#1 lore raw
Quoted 4 lines · Mehrdad Arshad Rad

There is a same action when load_attr.attach_btf_id is initialized.

The fix looks good. Please rebase the change on top of bpf-next/master branch. Also, please prefix the patch with "[PATCH bpf-next]".

Thanks,
Song