From: kernel test robot <lkp@intel.com>
To: Eduard Zingerman <eddyz87@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Alexei Starovoitov <ast@kernel.org>
Subject: [bpf-next:master 72/83] kernel/bpf/liveness.c:309:34: warning: variable 'cnt' set but not used
Date: Sat, 11 Apr 2026 14:52:07 +0800 [thread overview]
Message-ID: <202604111401.eqzyF2kx-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
head: d6bae125f21f74201a3eab0996b2f27be3abc4bf
commit: 2c167d91775b0928eba1d2b9b5483ede63ca7b2e [72/83] bpf: change logging scheme for live stack analysis
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260411/202604111401.eqzyF2kx-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260411/202604111401.eqzyF2kx-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/202604111401.eqzyF2kx-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/bpf/liveness.c:309:34: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
309 | u32 i, frame, po_start, po_end, cnt;
| ^
1 warning generated.
vim +/cnt +309 kernel/bpf/liveness.c
b3698c356ad92b Eduard Zingerman 2025-09-18 305
6762e3a0bce5fc Eduard Zingerman 2026-04-10 306 /* Fixed-point computation of @live_before marks */
6762e3a0bce5fc Eduard Zingerman 2026-04-10 307 static void update_instance(struct bpf_verifier_env *env, struct func_instance *instance)
b3698c356ad92b Eduard Zingerman 2025-09-18 308 {
6762e3a0bce5fc Eduard Zingerman 2026-04-10 @309 u32 i, frame, po_start, po_end, cnt;
b3698c356ad92b Eduard Zingerman 2025-09-18 310 int *insn_postorder = env->cfg.insn_postorder;
b3698c356ad92b Eduard Zingerman 2025-09-18 311 struct bpf_subprog_info *subprog;
b3698c356ad92b Eduard Zingerman 2025-09-18 312 bool changed;
8d3219f64d98f4 Eduard Zingerman 2026-04-10 313
6762e3a0bce5fc Eduard Zingerman 2026-04-10 314 instance->must_write_initialized = true;
6762e3a0bce5fc Eduard Zingerman 2026-04-10 315 subprog = &env->subprog_info[instance->subprog];
b3698c356ad92b Eduard Zingerman 2025-09-18 316 po_start = subprog->postorder_start;
b3698c356ad92b Eduard Zingerman 2025-09-18 317 po_end = (subprog + 1)->postorder_start;
b3698c356ad92b Eduard Zingerman 2025-09-18 318 cnt = 0;
b3698c356ad92b Eduard Zingerman 2025-09-18 319 /* repeat until fixed point is reached */
b3698c356ad92b Eduard Zingerman 2025-09-18 320 do {
b3698c356ad92b Eduard Zingerman 2025-09-18 321 cnt++;
b3698c356ad92b Eduard Zingerman 2025-09-18 322 changed = false;
6762e3a0bce5fc Eduard Zingerman 2026-04-10 323 for (frame = 0; frame <= instance->depth; frame++) {
b3698c356ad92b Eduard Zingerman 2025-09-18 324 if (!instance->frames[frame])
b3698c356ad92b Eduard Zingerman 2025-09-18 325 continue;
b3698c356ad92b Eduard Zingerman 2025-09-18 326
b3698c356ad92b Eduard Zingerman 2025-09-18 327 for (i = po_start; i < po_end; i++)
b3698c356ad92b Eduard Zingerman 2025-09-18 328 changed |= update_insn(env, instance, frame, insn_postorder[i]);
b3698c356ad92b Eduard Zingerman 2025-09-18 329 }
b3698c356ad92b Eduard Zingerman 2025-09-18 330 } while (changed);
b3698c356ad92b Eduard Zingerman 2025-09-18 331 }
b3698c356ad92b Eduard Zingerman 2025-09-18 332
:::::: The code at line 309 was first introduced by commit
:::::: 6762e3a0bce5fce94bca3c34ff13cde6a07b87f3 bpf: simplify liveness to use (callsite, depth) keyed func_instances
:::::: TO: Eduard Zingerman <eddyz87@gmail.com>
:::::: CC: Alexei Starovoitov <ast@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-11 6:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202604111401.eqzyF2kx-lkp@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=eddyz87@gmail.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox