Hi Chenghao, kernel test robot noticed the following build warnings: [auto build test WARNING on bpf-next/net] [also build test WARNING on bpf-next/master bpf/master linus/master v6.16-rc5 next-20250709] [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/Chenghao-Duan/LoongArch-Add-the-function-to-generate-the-beq-and-bne-assembly-instructions/20250709-135350 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git net patch link: https://lore.kernel.org/r/20250709055029.723243-6-duanchenghao%40kylinos.cn patch subject: [PATCH v3 5/5] LoongArch: BPF: Add bpf trampoline support for Loongarch config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20250710/202507100034.wXofj6VX-lkp@xxxxxxxxx/config) compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 01c97b4953e87ae455bd4c41e3de3f0f0f29c61c) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250710/202507100034.wXofj6VX-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/202507100034.wXofj6VX-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> arch/loongarch/net/bpf_jit.c:1411:6: warning: variable 'ip' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 1411 | if (addr && ctx->image && ctx->ro_image) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/net/bpf_jit.c:1414:51: note: uninitialized use occurs here 1414 | return emit_jump_and_link(ctx, LOONGARCH_GPR_RA, ip, addr); | ^~ arch/loongarch/net/bpf_jit.c:1411:2: note: remove the 'if' if its condition is always true 1411 | if (addr && ctx->image && ctx->ro_image) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1412 | ip = (u64)(ctx->image + ctx->idx); >> arch/loongarch/net/bpf_jit.c:1411:6: warning: variable 'ip' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] 1411 | if (addr && ctx->image && ctx->ro_image) | ^~~~~~~~~~~~~~~~~~ arch/loongarch/net/bpf_jit.c:1414:51: note: uninitialized use occurs here 1414 | return emit_jump_and_link(ctx, LOONGARCH_GPR_RA, ip, addr); | ^~ arch/loongarch/net/bpf_jit.c:1411:6: note: remove the '&&' if its condition is always true 1411 | if (addr && ctx->image && ctx->ro_image) | ^~~~~~~~~~~~~~~~~~~~~ >> arch/loongarch/net/bpf_jit.c:1411:6: warning: variable 'ip' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] 1411 | if (addr && ctx->image && ctx->ro_image) | ^~~~ arch/loongarch/net/bpf_jit.c:1414:51: note: uninitialized use occurs here 1414 | return emit_jump_and_link(ctx, LOONGARCH_GPR_RA, ip, addr); | ^~ arch/loongarch/net/bpf_jit.c:1411:6: note: remove the '&&' if its condition is always true 1411 | if (addr && ctx->image && ctx->ro_image) | ^~~~~~~ arch/loongarch/net/bpf_jit.c:1409:8: note: initialize the variable 'ip' to silence this warning 1409 | u64 ip; | ^ | = 0 3 warnings generated. vim +1411 arch/loongarch/net/bpf_jit.c 1406 1407 static int emit_call(struct jit_ctx *ctx, u64 addr) 1408 { 1409 u64 ip; 1410 > 1411 if (addr && ctx->image && ctx->ro_image) 1412 ip = (u64)(ctx->image + ctx->idx); 1413 1414 return emit_jump_and_link(ctx, LOONGARCH_GPR_RA, ip, addr); 1415 } 1416 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki