diff options
| author | Martin KaFai Lau <[email protected]> | 2020-09-24 17:03:44 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-09-25 13:58:01 -0700 |
| commit | a968d5e277f1a640a3184561ac2c39261ba79196 (patch) | |
| tree | b5828c48b421240b444bca470034ace56372c063 /tools/perf/scripts/python/bin | |
| parent | 182bf3f3ddb607a0715b73a8396af1fce0945c14 (diff) | |
bpf: Move the PTR_TO_BTF_ID check to check_reg_type()
check_reg_type() checks whether a reg can be used as an arg of a
func_proto. For PTR_TO_BTF_ID, the check is actually not
completely done until the reg->btf_id is pointing to a
kernel struct that is acceptable by the func_proto.
Thus, this patch moves the btf_id check into check_reg_type().
"arg_type" and "arg_btf_id" are passed to check_reg_type() instead of
"compatible". The compatible_reg_types[] usage is localized in
check_reg_type() now.
The "if (!btf_id) verbose(...); " is also removed since it won't happen.
Signed-off-by: Martin KaFai Lau <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Lorenz Bauer <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions