Message ID | 20190410134923.35100-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | ecfc3fcabbb5291d1e61600a3dac6cdbfdb04cb1 |
Headers | show |
Series | MIPS: eBPF: Make ebpf_to_mips_reg() static | expand |
On 4/10/19 6:49 AM, Yue Haibing wrote: > From: YueHaibing <yuehaibing@huawei.com> > > 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>
On 04/10/2019 03:49 PM, Yue Haibing wrote: > From: YueHaibing <yuehaibing@huawei.com> > > 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> Applied, thanks!
diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c index 3548a69..dfd5a4b 100644 --- a/arch/mips/net/ebpf_jit.c +++ b/arch/mips/net/ebpf_jit.c @@ -193,8 +193,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;