bpf: Remove unnecessary call to btf_field_type_size().
authorKui-Feng Lee <thinker.li@gmail.com>
Thu, 23 May 2024 17:41:55 +0000 (10:41 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 4 Jun 2024 03:52:42 +0000 (20:52 -0700)
commit482f7133791e894b94a57ab3251e03d4c98ea42b
treedd090e2e84e49f85eeca59f47fb231427a559e8c
parentc95a3be45ad22ee8925d6d1ab531d5ba98216311
bpf: Remove unnecessary call to btf_field_type_size().

field->size has been initialized by bpf_parse_fields() with the value
returned by btf_field_type_size(). Use it instead of calling
btf_field_type_size() again.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240523174202.461236-3-thinker.li@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/btf.c
kernel/bpf/verifier.c