netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bpf, x86:remove unneeded variable
@ 2021-11-03  5:47 cgel.zte
  2021-11-03  5:52 ` Alexei Starovoitov
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-11-03  5:47 UTC (permalink / raw)
  To: davem
  Cc: yoshfuji, dsahern, udknight, tglx, mingo, bp, dave.hansen, x86,
	hpa, ast, daniel, andrii, kafai, songliubraving, yhs,
	john.fastabend, kpsingh, netdev, bpf, linux-kernel, Zhang Mingyu,
	Zeal Robot

From: Zhang Mingyu <zhang.mingyu@zte.com.cn>

Fix the following coccinelle REVIEW:
./arch/x86/net/bpf_jit_comp32.c:1274:5-8

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
---
 arch/x86/net/bpf_jit_comp32.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c
index da9b7cfa4632..bce7b9b5a653 100644
--- a/arch/x86/net/bpf_jit_comp32.c
+++ b/arch/x86/net/bpf_jit_comp32.c
@@ -1271,7 +1271,6 @@ static void emit_epilogue(u8 **pprog, u32 stack_depth)
 static int emit_jmp_edx(u8 **pprog, u8 *ip)
 {
 	u8 *prog = *pprog;
-	int cnt = 0;
 
 #ifdef CONFIG_RETPOLINE
 	EMIT1_off32(0xE9, (u8 *)__x86_indirect_thunk_edx - (ip + 5));
@@ -1280,7 +1279,7 @@ static int emit_jmp_edx(u8 **pprog, u8 *ip)
 #endif
 	*pprog = prog;
 
-	return cnt;
+	return 0;
 }
 
 /*
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bpf, x86:remove unneeded variable
  2021-11-03  5:47 [PATCH] bpf, x86:remove unneeded variable cgel.zte
@ 2021-11-03  5:52 ` Alexei Starovoitov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexei Starovoitov @ 2021-11-03  5:52 UTC (permalink / raw)
  To: cgel.zte
  Cc: David S. Miller, Hideaki YOSHIFUJI, David Ahern, Wang YanQing,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	X86 ML, H. Peter Anvin, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Network Development, bpf, LKML,
	Zhang Mingyu, Zeal Robot

On Tue, Nov 2, 2021 at 10:47 PM <cgel.zte@gmail.com> wrote:
>
> From: Zhang Mingyu <zhang.mingyu@zte.com.cn>
>
> Fix the following coccinelle REVIEW:
> ./arch/x86/net/bpf_jit_comp32.c:1274:5-8

trash that checker and please send patches after you tested them.

> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
> ---
>  arch/x86/net/bpf_jit_comp32.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c
> index da9b7cfa4632..bce7b9b5a653 100644
> --- a/arch/x86/net/bpf_jit_comp32.c
> +++ b/arch/x86/net/bpf_jit_comp32.c
> @@ -1271,7 +1271,6 @@ static void emit_epilogue(u8 **pprog, u32 stack_depth)
>  static int emit_jmp_edx(u8 **pprog, u8 *ip)
>  {
>         u8 *prog = *pprog;
> -       int cnt = 0;
>
>  #ifdef CONFIG_RETPOLINE
>         EMIT1_off32(0xE9, (u8 *)__x86_indirect_thunk_edx - (ip + 5));
> @@ -1280,7 +1279,7 @@ static int emit_jmp_edx(u8 **pprog, u8 *ip)
>  #endif
>         *pprog = prog;
>
> -       return cnt;
> +       return 0;
>  }
>
>  /*
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-03  5:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03  5:47 [PATCH] bpf, x86:remove unneeded variable cgel.zte
2021-11-03  5:52 ` Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).