From: kernel test robot <lkp@intel.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
x86@kernel.org, Peter Zijlstra <peterz@infradead.org>
Subject: [tip:sched/core 13/47] kernel/sched/core.c:10400:42: error: variable 'stats' set but not used
Date: Sun, 10 Oct 2021 09:37:37 +0800 [thread overview]
Message-ID: <202110100928.bK8nPf4x-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2886 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
head: b2d5b9cec60fecc72a13191c2c6c05acf60975a5
commit: ceeadb83aea28372e54857bf88ab7e17af48ab7b [13/47] sched: Make struct sched_statistics independent of fair sched class
config: microblaze-buildonly-randconfig-r002-20211010 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=ceeadb83aea28372e54857bf88ab7e17af48ab7b
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip sched/core
git checkout ceeadb83aea28372e54857bf88ab7e17af48ab7b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
kernel/sched/core.c: In function 'ttwu_stat':
kernel/sched/core.c:3482:20: error: variable 'rq' set but not used [-Werror=unused-but-set-variable]
3482 | struct rq *rq;
| ^~
kernel/sched/core.c: In function 'cpu_cfs_stat_show':
>> kernel/sched/core.c:10400:42: error: variable 'stats' set but not used [-Werror=unused-but-set-variable]
10400 | struct sched_statistics *stats;
| ^~~~~
cc1: all warnings being treated as errors
vim +/stats +10400 kernel/sched/core.c
10389
10390 static int cpu_cfs_stat_show(struct seq_file *sf, void *v)
10391 {
10392 struct task_group *tg = css_tg(seq_css(sf));
10393 struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
10394
10395 seq_printf(sf, "nr_periods %d\n", cfs_b->nr_periods);
10396 seq_printf(sf, "nr_throttled %d\n", cfs_b->nr_throttled);
10397 seq_printf(sf, "throttled_time %llu\n", cfs_b->throttled_time);
10398
10399 if (schedstat_enabled() && tg != &root_task_group) {
10400 struct sched_statistics *stats;
10401 u64 ws = 0;
10402 int i;
10403
10404 for_each_possible_cpu(i) {
10405 stats = __schedstats_from_se(tg->se[i]);
10406 ws += schedstat_val(stats->wait_sum);
10407 }
10408
10409 seq_printf(sf, "wait_sum %llu\n", ws);
10410 }
10411
10412 seq_printf(sf, "nr_bursts %d\n", cfs_b->nr_burst);
10413 seq_printf(sf, "burst_time %llu\n", cfs_b->burst_time);
10414
10415 return 0;
10416 }
10417 #endif /* CONFIG_CFS_BANDWIDTH */
10418 #endif /* CONFIG_FAIR_GROUP_SCHED */
10419
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38267 bytes --]
next reply other threads:[~2021-10-10 1:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 1:37 kernel test robot [this message]
2021-10-10 9:59 ` [tip:sched/core 13/47] kernel/sched/core.c:10400:42: error: variable 'stats' set but not used Yafang Shao
2021-10-10 10:57 ` Peter Zijlstra
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=202110100928.bK8nPf4x-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@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