public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* kernel/bpf/liveness.c:371:34: warning: variable 'cnt' set but not used
@ 2026-04-11 11:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-11 11:35 UTC (permalink / raw)
  To: Eduard Zingerman; +Cc: llvm, oe-kbuild-all, 0day robot

tree:   https://github.com/intel-lab-lkp/linux/commits/Eduard-Zingerman/bpf-share-several-utility-functions-as-internal-API/20260411-114028
head:   ad9095e5b6b2e04ae837fa578308a4f7f48fb24e
commit: dc02669dbcd7fae4c4ec1cbcf98f86002d462772 bpf: change logging scheme for live stack analysis
date:   8 hours ago
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260411/202604111314.SCpV3BPU-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260411/202604111314.SCpV3BPU-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604111314.SCpV3BPU-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/bpf/liveness.c:371:34: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
     371 |         u32 i, frame, po_start, po_end, cnt;
         |                                         ^
   1 warning generated.


vim +/cnt +371 kernel/bpf/liveness.c

b3698c356ad92b Eduard Zingerman 2025-09-18  367  
5c742328a727cd Eduard Zingerman 2026-04-10  368  /* Fixed-point computation of @live_before marks */
5c742328a727cd Eduard Zingerman 2026-04-10  369  static void update_instance(struct bpf_verifier_env *env, struct func_instance *instance)
b3698c356ad92b Eduard Zingerman 2025-09-18  370  {
5c742328a727cd Eduard Zingerman 2026-04-10 @371  	u32 i, frame, po_start, po_end, cnt;
b3698c356ad92b Eduard Zingerman 2025-09-18  372  	int *insn_postorder = env->cfg.insn_postorder;
b3698c356ad92b Eduard Zingerman 2025-09-18  373  	struct bpf_subprog_info *subprog;
b3698c356ad92b Eduard Zingerman 2025-09-18  374  	bool changed;
b3698c356ad92b Eduard Zingerman 2025-09-18  375  
5c742328a727cd Eduard Zingerman 2026-04-10  376  	instance->must_write_initialized = true;
5c742328a727cd Eduard Zingerman 2026-04-10  377  	subprog = &env->subprog_info[instance->subprog];
b3698c356ad92b Eduard Zingerman 2025-09-18  378  	po_start = subprog->postorder_start;
b3698c356ad92b Eduard Zingerman 2025-09-18  379  	po_end = (subprog + 1)->postorder_start;
b3698c356ad92b Eduard Zingerman 2025-09-18  380  	cnt = 0;
b3698c356ad92b Eduard Zingerman 2025-09-18  381  	/* repeat until fixed point is reached */
b3698c356ad92b Eduard Zingerman 2025-09-18  382  	do {
b3698c356ad92b Eduard Zingerman 2025-09-18  383  		cnt++;
b3698c356ad92b Eduard Zingerman 2025-09-18  384  		changed = false;
5c742328a727cd Eduard Zingerman 2026-04-10  385  		for (frame = 0; frame <= instance->depth; frame++) {
b3698c356ad92b Eduard Zingerman 2025-09-18  386  			if (!instance->frames[frame])
b3698c356ad92b Eduard Zingerman 2025-09-18  387  				continue;
b3698c356ad92b Eduard Zingerman 2025-09-18  388  
b3698c356ad92b Eduard Zingerman 2025-09-18  389  			for (i = po_start; i < po_end; i++)
b3698c356ad92b Eduard Zingerman 2025-09-18  390  				changed |= update_insn(env, instance, frame, insn_postorder[i]);
b3698c356ad92b Eduard Zingerman 2025-09-18  391  		}
b3698c356ad92b Eduard Zingerman 2025-09-18  392  	} while (changed);
b3698c356ad92b Eduard Zingerman 2025-09-18  393  }
b3698c356ad92b Eduard Zingerman 2025-09-18  394  

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-11 11:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-11 11:35 kernel/bpf/liveness.c:371:34: warning: variable 'cnt' set but not used kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox