MIPS: eBPF: Make ebpf_to_mips_reg() static
authorYueHaibing <yuehaibing@huawei.com>
Wed, 10 Apr 2019 13:49:23 +0000 (21:49 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 26 Apr 2019 00:20:06 +0000 (17:20 -0700)
Fix sparse warning:

arch/mips/net/ebpf_jit.c:196:5: warning:
 symbol 'ebpf_to_mips_reg' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/mips/net/ebpf_jit.c

index 0effd3cba9a731907920c6f47a1b52321ac7225f..98bf0c222b5fe84c2086a8707172392323829d57 100644 (file)
@@ -186,8 +186,9 @@ enum which_ebpf_reg {
  * separate frame pointer, so BPF_REG_10 relative accesses are
  * adjusted to be $sp relative.
  */
-int ebpf_to_mips_reg(struct jit_ctx *ctx, const struct bpf_insn *insn,
-                    enum which_ebpf_reg w)
+static int ebpf_to_mips_reg(struct jit_ctx *ctx,
+                           const struct bpf_insn *insn,
+                           enum which_ebpf_reg w)
 {
        int ebpf_reg = (w == src_reg || w == src_reg_no_fp) ?
                insn->src_reg : insn->dst_reg;