MIPS: eBPF: Make ebpf_to_mips_reg() static [Linux 5.1]

MIPS: eBPF: Make ebpf_to_mips_reg() static [Linux 5.1]

This Linux kernel change "MIPS: eBPF: Make ebpf_to_mips_reg() static" is included in the Linux 5.1 release. This change is authored by YueHaibing <yuehaibing [at] huawei.com> on Wed Apr 10 21:49:23 2019 +0800. The commit for this change in Linux stable tree is ecfc3fc (patch).

MIPS: eBPF: Make ebpf_to_mips_reg() static

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 <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>

There are 5 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 arch/mips/net/ebpf_jit.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c
index 0effd3c..98bf0c2 100644
--- a/arch/mips/net/ebpf_jit.c
+++ b/arch/mips/net/ebpf_jit.c
@@ -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;

Leave a Reply

Your email address will not be published. Required fields are marked *