CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Gary Lin <[email protected]>
CC: Alexei Starovoitov <[email protected]>
CC: Hideaki YOSHIFUJI <[email protected]>
CC: Daniel Borkmann <[email protected]>
CC: Thomas Gleixner <[email protected]>
CC: Ingo Molnar <[email protected]>
CC: Borislav Petkov <[email protected]>
CC: [email protected]
CC: "H. Peter Anvin" <[email protected]>
CC: Andrii Nakryiko <[email protected]>

From: kernel test robot <[email protected]>

arch/x86/net/bpf_jit_comp.c:875:16-19: Unneeded variable: "cnt". Return "0" on 
line 890


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 93c5aecc35c6 ("bpf,x64: Pad NOPs to make images converge more easily")
CC: Gary Lin <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   6553715b6db5ff5d4898895dad1b2926cfe406cf
commit: 93c5aecc35c61414073d848e1ba637fc2cae98a8 [4008/11526] bpf,x64: Pad NOPs 
to make images converge more easily
:::::: branch date: 8 hours ago
:::::: commit date: 4 weeks ago

Please take the patch only if it's a positive warning. Thanks!

 bpf_jit_comp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -872,7 +872,7 @@ static void detect_reg_usage(struct bpf_
 static int emit_nops(u8 **pprog, int len)
 {
        u8 *prog = *pprog;
-       int i, noplen, cnt = 0;
+       int i, noplen;
 
        while (len > 0) {
                noplen = len;
@@ -887,7 +887,7 @@ static int emit_nops(u8 **pprog, int len
 
        *pprog = prog;
 
-       return cnt;
+       return 0;
 }
 
 #define INSN_SZ_DIFF (((addrs[i] - addrs[i - 1]) - (prog - temp)))
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to