summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>2019-04-16 18:13:01 +0900
committerAlexei Starovoitov <ast@kernel.org>2019-04-16 19:28:31 -0700
commit0d306c31b2f77391dacdeaad4470c577f2aecc4f (patch)
tree8de9bac85de4ad6a362979d5178dd7d600f90d10 /kernel
parent725721a6506eea53bfde81a34e91a06d6162c216 (diff)
downloadlinux-0d306c31b2f77391dacdeaad4470c577f2aecc4f.tar.bz2
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 <bhole_prashant_q7@lab.ntt.co.jp> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/bpf/verifier.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index c7220153c5b1..db301e9b5295 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