diff mbox series

MIPS: eBPF: Make ebpf_to_mips_reg() static

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

Commit Message

Yue Haibing April 10, 2019, 1:49 p.m. UTC
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>
---
 arch/mips/net/ebpf_jit.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Yonghong Song April 10, 2019, 4:37 p.m. UTC | #1
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>
Daniel Borkmann April 11, 2019, 7:59 p.m. UTC | #2
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 mbox series

Patch

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;