summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJianyun Gao <jianyungao89@gmail.com>2025-10-24 11:08:02 +0300
committerAndrii Nakryiko <andrii@kernel.org>2025-10-28 20:26:00 +0300
commit4f361895ae65675c7a3ee339883d72ae9a2121e9 (patch)
tree2d3f7e1e9cb102094435a0886e0bd6353936ad37 /tools/perf/scripts/python
parent23f852daa4bab4d579110e034e4d513f7d490846 (diff)
downloadlinux-4f361895ae65675c7a3ee339883d72ae9a2121e9.tar.xz
libbpf: Optimize the redundant code in the bpf_object__init_user_btf_maps() function.
In the elf_sec_data() function, the input parameter 'scn' will be evaluated. If it is NULL, then it will directly return NULL. Therefore, the return value of the elf_sec_data() function already takes into account the case where the input parameter scn is NULL. Therefore, subsequently, the code only needs to check whether the return value of the elf_sec_data() function is NULL. Signed-off-by: Jianyun Gao <jianyungao89@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/bpf/20251024080802.642189-1-jianyungao89@gmail.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions