Skip to content

Commit fa2d41a

Browse files
Colin Ian Kingborkmann
authored andcommitted
bpf: make function skip_callee static and return NULL rather than 0
Function skip_callee is local to the source and does not need to be in global scope, so make it static. Also return NULL rather than 0. Cleans up two sparse warnings: symbol 'skip_callee' was not declared. Should it be static? Using plain integer as NULL pointer Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent e90004d commit fa2d41a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎kernel/bpf/verifier.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ static int check_subprogs(struct bpf_verifier_env *env)
823823
return 0;
824824
}
825825

826+
static
826827
struct bpf_verifier_state *skip_callee(struct bpf_verifier_env *env,
827828
const struct bpf_verifier_state *state,
828829
struct bpf_verifier_state *parent,
@@ -867,7 +868,7 @@ struct bpf_verifier_state *skip_callee(struct bpf_verifier_env *env,
867868
verbose(env, "verifier bug regno %d tmp %p\n", regno, tmp);
868869
verbose(env, "regno %d parent frame %d current frame %d\n",
869870
regno, parent->curframe, state->curframe);
870-
return 0;
871+
return NULL;
871872
}
872873

873874
static int mark_reg_read(struct bpf_verifier_env *env,

0 commit comments

Comments
 (0)