Skip to content
Commit 82ce364c authored by Shung-Hsi Yu's avatar Shung-Hsi Yu Committed by Alexei Starovoitov
Browse files

bpf: replace register_is_const() with is_reg_const()



The addition of is_reg_const() in commit 171de12646d2 ("bpf: generalize
is_branch_taken to handle all conditional jumps in one place") has made the
register_is_const() redundant. Give the former has more feature, plus the
fact the latter is only used in one place, replace register_is_const() with
is_reg_const(), and remove the definition of register_is_const.

This requires moving the definition of is_reg_const() further up. And since
the comment of reg_const_value() reference is_reg_const(), move it up as
well.

Signed-off-by: default avatarShung-Hsi Yu <shung-hsi.yu@suse.com>
Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231108140043.12282-1-shung-hsi.yu@suse.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 27007fae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment