Skip to content

Commit aec42f3

Browse files
author
Alexei Starovoitov
committed
bpf: Remove unused variables.
Remove unused prev_offset, min_size, krec_size variables. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: aaa619e ("bpf: Refactor check_btf_func and split into two phases") Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 5bfdb4f commit aec42f3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

kernel/bpf/verifier.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15339,14 +15339,12 @@ static int check_btf_func(struct bpf_verifier_env *env,
1533915339
bpfptr_t uattr)
1534015340
{
1534115341
const struct btf_type *type, *func_proto, *ret_type;
15342-
u32 i, nfuncs, urec_size, min_size;
15343-
u32 krec_size = sizeof(struct bpf_func_info);
15342+
u32 i, nfuncs, urec_size;
1534415343
struct bpf_func_info *krecord;
1534515344
struct bpf_func_info_aux *info_aux = NULL;
1534615345
struct bpf_prog *prog;
1534715346
const struct btf *btf;
1534815347
bpfptr_t urecord;
15349-
u32 prev_offset = 0;
1535015348
bool scalar_return;
1535115349
int ret = -ENOMEM;
1535215350

@@ -15367,7 +15365,6 @@ static int check_btf_func(struct bpf_verifier_env *env,
1536715365
btf = prog->aux->btf;
1536815366

1536915367
urecord = make_bpfptr(attr->func_info, uattr.is_kernel);
15370-
min_size = min_t(u32, krec_size, urec_size);
1537115368

1537215369
krecord = prog->aux->func_info;
1537315370
info_aux = kcalloc(nfuncs, sizeof(*info_aux), GFP_KERNEL | __GFP_NOWARN);
@@ -15401,7 +15398,6 @@ static int check_btf_func(struct bpf_verifier_env *env,
1540115398
goto err_free;
1540215399
}
1540315400

15404-
prev_offset = krecord[i].insn_off;
1540515401
bpfptr_add(&urecord, urec_size);
1540615402
}
1540715403

0 commit comments

Comments
 (0)