Re: [PATCH] x86: net: bpf_jit_comp32: Remove unused 'cnt' variables from most functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi kunyu,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master net-next/main net/main linus/master v6.10-rc3 next-20240612]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/kunyu/x86-net-bpf_jit_comp32-Remove-unused-cnt-variables-from-most-functions/20240612-170017
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20240612085823.28133-1-kunyu%40nfschina.com
patch subject: [PATCH] x86: net: bpf_jit_comp32: Remove unused 'cnt' variables from most functions
config: i386-buildonly-randconfig-005-20240613 (https://download.01.org/0day-ci/archive/20240613/202406130855.la1z88C0-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240613/202406130855.la1z88C0-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406130855.la1z88C0-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_mov_i':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:68:24: note: in expansion of macro 'EMIT'
    #define EMIT2(b1, b2)  EMIT((b1) + ((b2) << 8), 2)
                           ^~~~
   arch/x86/net/bpf_jit_comp32.c:214:4: note: in expansion of macro 'EMIT2'
       EMIT2(0x33, add_2reg(0xC0, IA32_EAX, IA32_EAX));
       ^~~~~
   arch/x86/net/bpf_jit_comp32.c:65:43: note: each undeclared identifier is reported only once for each function it appears in
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:68:24: note: in expansion of macro 'EMIT'
    #define EMIT2(b1, b2)  EMIT((b1) + ((b2) << 8), 2)
                           ^~~~
   arch/x86/net/bpf_jit_comp32.c:214:4: note: in expansion of macro 'EMIT2'
       EMIT2(0x33, add_2reg(0xC0, IA32_EAX, IA32_EAX));
       ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_mov_r':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:241:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX), STACK_VAR(src));
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_mul_r':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:291:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_ECX), STACK_VAR(src));
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_to_le_r64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:323:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_to_be_r64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:370:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_div_mod_r':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:437:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_ECX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_shift_r':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:485:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX), STACK_VAR(dst));
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_alu_r':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:526:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX), STACK_VAR(src));
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_alu_i':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:599:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX), STACK_VAR(dst));
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_neg64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:696:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_lsh_r64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:729:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_arsh_r64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:781:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_rsh_r64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:833:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_lsh_i64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:885:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_rsh_i64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:932:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_arsh_i64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:980:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_mul_r64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:1026:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_ia32_mul_i64':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:68:24: note: in expansion of macro 'EMIT'
    #define EMIT2(b1, b2)  EMIT((b1) + ((b2) << 8), 2)
                           ^~~~
   arch/x86/net/bpf_jit_comp32.c:76:7: note: in expansion of macro 'EMIT2'
     do { EMIT2(b1, b2); EMIT(off, 4); } while (0)
          ^~~~~
   arch/x86/net/bpf_jit_comp32.c:1103:2: note: in expansion of macro 'EMIT2_off32'
     EMIT2_off32(0xC7, add_1reg(0xC0, IA32_EAX), val);
     ^~~~~~~~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_prologue':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:67:20: note: in expansion of macro 'EMIT'
    #define EMIT1(b1)  EMIT(b1, 1)
                       ^~~~
   arch/x86/net/bpf_jit_comp32.c:1191:2: note: in expansion of macro 'EMIT1'
     EMIT1(0x55);
     ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_epilogue':
>> arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:1231:2: note: in expansion of macro 'EMIT3'
     EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_EAX), STACK_VAR(r0[0]));
     ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_push_r64':
   arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:1375:2: note: in expansion of macro 'EMIT3'
     EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_ECX), STACK_VAR(src_hi));
     ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_push_r32':
   arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:1392:2: note: in expansion of macro 'EMIT3'
     EMIT3(0x8B, add_2reg(0x40, IA32_EBP, IA32_ECX), STACK_VAR(src_lo));
     ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'emit_kfunc_call':
   arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:69:27: note: in expansion of macro 'EMIT'
    #define EMIT3(b1, b2, b3) EMIT((b1) + ((b2) << 8) + ((b3) << 16), 3)
                              ^~~~
   arch/x86/net/bpf_jit_comp32.c:1588:3: note: in expansion of macro 'EMIT3'
      EMIT3(0x8B, add_2reg(0x40, IA32_EBP, *cur_arg_reg++),
      ^~~~~
   arch/x86/net/bpf_jit_comp32.c: In function 'do_jit':
   arch/x86/net/bpf_jit_comp32.c:65:43: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
     do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
                                              ^
   arch/x86/net/bpf_jit_comp32.c:68:24: note: in expansion of macro 'EMIT'
    #define EMIT2(b1, b2)  EMIT((b1) + ((b2) << 8), 2)
                           ^~~~
   arch/x86/net/bpf_jit_comp32.c:76:7: note: in expansion of macro 'EMIT2'
     do { EMIT2(b1, b2); EMIT(off, 4); } while (0)
          ^~~~~
   arch/x86/net/bpf_jit_comp32.c:1737:5: note: in expansion of macro 'EMIT2_off32'
        EMIT2_off32(0xC7, add_1reg(0xC0, IA32_ECX),
        ^~~~~~~~~~~


vim +65 arch/x86/net/bpf_jit_comp32.c

03f5781be2c7b7 Wang YanQing 2018-05-03  63  
03f5781be2c7b7 Wang YanQing 2018-05-03  64  #define EMIT(bytes, len) \
03f5781be2c7b7 Wang YanQing 2018-05-03 @65  	do { prog = emit_code(prog, bytes, len); cnt += len; } while (0)
03f5781be2c7b7 Wang YanQing 2018-05-03  66  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux