On 10/20/23 08:12, Kui-Feng Lee wrote:
On 10/18/23 18:49, Martin KaFai Lau wrote:
On 10/17/23 9:23 AM, thinker.li@xxxxxxxxx wrote:
From: Kui-Feng Lee <thinker.li@xxxxxxxxx>
static const struct bpf_struct_ops *
bpf_struct_ops_find_value(struct btf *btf, u32 value_id)
{
+ const struct bpf_struct_ops *st_ops = NULL;
+ const struct bpf_struct_ops **st_ops_list;
unsigned int i;
+ u32 cnt = 0;
if (!value_id || !btf_vmlinux)
The "!btf_vmlinux" should have been changed to "!btf" in the earlier
patch (patch 2?),
This is not btf. It mean to check if btf_vmlinux is initialized.
It is not necessary anymore.
For checking btf, the following btf_get_struct_ops() will keep cnt zero
if btf is NULL, so it is unnecessary as well.
Forget my previous comment. I think you are right!