From: kernel test robot <lkp@intel.com>
To: SeongJae Park <sj@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [sj:damon/next 60/63] mm/damon/core.c:1339:16: warning: variable 'nr_regions' set but not used
Date: Thu, 30 Jan 2025 00:08:39 +0800 [thread overview]
Message-ID: <202501300041.usRaByZc-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
head: db09358b42a2d75f76c297d9eedceeb9786c96fd
commit: dcd0807d5a93d6e7b64f63de86de810f55a19bfb [60/63] mm/damon: intervals tuning parameters refactoring
config: s390-randconfig-001-20250129 (https://download.01.org/0day-ci/archive/20250130/202501300041.usRaByZc-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 19306351a2c45e266fa11b41eb1362b20b6ca56d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250130/202501300041.usRaByZc-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/202501300041.usRaByZc-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/damon/core.c:1351:65: warning: more '%' conversions than data arguments [-Wformat-insufficient-args]
1351 | pr_info("access_samples %lu/%lu, score_bp %lu, adaptation bp %lu\n",
| ~~^
include/linux/printk.h:574:26: note: expanded from macro 'pr_info'
574 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~
mm/damon/core.c:8:31: note: expanded from macro 'pr_fmt'
8 | #define pr_fmt(fmt) "damon: " fmt
| ^~~
include/linux/printk.h:501:53: note: expanded from macro 'printk'
501 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ^~~
include/linux/printk.h:473:11: note: expanded from macro 'printk_index_wrap'
473 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
>> mm/damon/core.c:1339:16: warning: variable 'nr_regions' set but not used [-Wunused-but-set-variable]
1339 | unsigned long nr_regions = 0, access_samples = 0, score_bp;
| ^
mm/damon/core.c:1358:31: warning: unused variable 'sample_to_aggr_bp' [-Wunused-variable]
1358 | unsigned long adaptation_bp, sample_to_aggr_bp;
| ^~~~~~~~~~~~~~~~~
3 warnings generated.
vim +/nr_regions +1339 mm/damon/core.c
1331
1332 static unsigned long damon_feed_loop_next_input(unsigned long last_input,
1333 unsigned long score);
1334
1335 static unsigned long damon_get_intervals_adaptation_bp(struct damon_ctx *c)
1336 {
1337 struct damon_target *t;
1338 struct damon_region *r;
> 1339 unsigned long nr_regions = 0, access_samples = 0, score_bp;
1340 unsigned long adaptation_bp;
1341
1342 damon_for_each_target(t, c) {
1343 nr_regions += damon_nr_regions(t);
1344 damon_for_each_region(r, t)
1345 access_samples += r->nr_accesses;
1346 }
1347 score_bp = access_samples * 10000 / c->attrs.intervals_goal.samples;
1348 adaptation_bp = damon_feed_loop_next_input(100000000, score_bp) /
1349 10000;
1350
1351 pr_info("access_samples %lu/%lu, score_bp %lu, adaptation bp %lu\n",
1352 access_samples, score_bp, adaptation_bp);
1353 return adaptation_bp;
1354 }
1355
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-01-29 16:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 16:08 kernel test robot [this message]
2025-01-29 18:26 ` [sj:damon/next 60/63] mm/damon/core.c:1339:16: warning: variable 'nr_regions' set but not used SeongJae Park
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=202501300041.usRaByZc-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sj@kernel.org \
/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