From: Prashant Bhole Date: Tue, 16 Apr 2019 09:13:01 +0000 (+0900) Subject: bpf: use BPF_CAST_CALL for casting bpf call X-Git-Tag: v5.2-rc1~133^2~132^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d306c31b2f77391dacdeaad4470c577f2aecc4f;p=thirdparty%2Fkernel%2Flinux.git bpf: use BPF_CAST_CALL for casting bpf call verifier.c uses BPF_CAST_CALL for casting bpf call except at one place in jit_subprogs(). Let's use the macro for consistency. Signed-off-by: Prashant Bhole Acked-by: Song Liu Signed-off-by: Alexei Starovoitov --- diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index c7220153c5b1b..db301e9b52950 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -7647,9 +7647,8 @@ static int jit_subprogs(struct bpf_verifier_env *env) insn->src_reg != BPF_PSEUDO_CALL) continue; subprog = insn->off; - insn->imm = (u64 (*)(u64, u64, u64, u64, u64)) - func[subprog]->bpf_func - - __bpf_call_base; + insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) - + __bpf_call_base; } /* we use the aux data to keep a list of the start addresses