From: YueHaibing <[email protected]>
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]>
---
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 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;
--
2.7.4
On 4/10/19 6:49 AM, Yue Haibing wrote:
> From: YueHaibing <[email protected]>
>
> 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]>
On 04/10/2019 03:49 PM, Yue Haibing wrote:
> From: YueHaibing <[email protected]>
>
> 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]>
Applied, thanks!