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
Subject: [peterz-queue:sched/core 13/19] kernel/sched/core.c:10238:42: warning: variable 'stats' set but not used
Date: Sat, 11 Sep 2021 02:28:55 +0800 [thread overview]
Message-ID: <202109110249.0mkAt6Nv-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2855 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: 2dfdb3d20ad50e2ae2cb84cbceb0f0fc75e79e5d
commit: 445d9e8ba05d5e9e4b26956b7fe529223e29d8d1 [13/19] sched: make struct sched_statistics independent of fair sched class
config: nds32-buildonly-randconfig-r001-20210910 (attached as .config)
compiler: nds32le-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/peterz/queue.git/commit/?id=445d9e8ba05d5e9e4b26956b7fe529223e29d8d1
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/core
git checkout 445d9e8ba05d5e9e4b26956b7fe529223e29d8d1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/core.c: In function 'ttwu_stat':
kernel/sched/core.c:3465:20: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
3465 | struct rq *rq;
| ^~
kernel/sched/core.c: In function 'cpu_cfs_stat_show':
>> kernel/sched/core.c:10238:42: warning: variable 'stats' set but not used [-Wunused-but-set-variable]
10238 | struct sched_statistics *stats;
| ^~~~~
vim +/stats +10238 kernel/sched/core.c
10227
10228 static int cpu_cfs_stat_show(struct seq_file *sf, void *v)
10229 {
10230 struct task_group *tg = css_tg(seq_css(sf));
10231 struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
10232
10233 seq_printf(sf, "nr_periods %d\n", cfs_b->nr_periods);
10234 seq_printf(sf, "nr_throttled %d\n", cfs_b->nr_throttled);
10235 seq_printf(sf, "throttled_time %llu\n", cfs_b->throttled_time);
10236
10237 if (schedstat_enabled() && tg != &root_task_group) {
10238 struct sched_statistics *stats;
10239 u64 ws = 0;
10240 int i;
10241
10242 for_each_possible_cpu(i) {
10243 stats = __schedstats_from_se(tg->se[i]);
10244 ws += schedstat_val(stats->wait_sum);
10245 }
10246
10247 seq_printf(sf, "wait_sum %llu\n", ws);
10248 }
10249
10250 seq_printf(sf, "nr_bursts %d\n", cfs_b->nr_burst);
10251 seq_printf(sf, "burst_time %llu\n", cfs_b->burst_time);
10252
10253 return 0;
10254 }
10255 #endif /* CONFIG_CFS_BANDWIDTH */
10256 #endif /* CONFIG_FAIR_GROUP_SCHED */
10257
---
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: 25135 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [peterz-queue:sched/core 13/19] kernel/sched/core.c:10238:42: warning: variable 'stats' set but not used
Date: Sat, 11 Sep 2021 02:28:55 +0800 [thread overview]
Message-ID: <202109110249.0mkAt6Nv-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2924 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: 2dfdb3d20ad50e2ae2cb84cbceb0f0fc75e79e5d
commit: 445d9e8ba05d5e9e4b26956b7fe529223e29d8d1 [13/19] sched: make struct sched_statistics independent of fair sched class
config: nds32-buildonly-randconfig-r001-20210910 (attached as .config)
compiler: nds32le-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/peterz/queue.git/commit/?id=445d9e8ba05d5e9e4b26956b7fe529223e29d8d1
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/core
git checkout 445d9e8ba05d5e9e4b26956b7fe529223e29d8d1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/core.c: In function 'ttwu_stat':
kernel/sched/core.c:3465:20: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
3465 | struct rq *rq;
| ^~
kernel/sched/core.c: In function 'cpu_cfs_stat_show':
>> kernel/sched/core.c:10238:42: warning: variable 'stats' set but not used [-Wunused-but-set-variable]
10238 | struct sched_statistics *stats;
| ^~~~~
vim +/stats +10238 kernel/sched/core.c
10227
10228 static int cpu_cfs_stat_show(struct seq_file *sf, void *v)
10229 {
10230 struct task_group *tg = css_tg(seq_css(sf));
10231 struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
10232
10233 seq_printf(sf, "nr_periods %d\n", cfs_b->nr_periods);
10234 seq_printf(sf, "nr_throttled %d\n", cfs_b->nr_throttled);
10235 seq_printf(sf, "throttled_time %llu\n", cfs_b->throttled_time);
10236
10237 if (schedstat_enabled() && tg != &root_task_group) {
10238 struct sched_statistics *stats;
10239 u64 ws = 0;
10240 int i;
10241
10242 for_each_possible_cpu(i) {
10243 stats = __schedstats_from_se(tg->se[i]);
10244 ws += schedstat_val(stats->wait_sum);
10245 }
10246
10247 seq_printf(sf, "wait_sum %llu\n", ws);
10248 }
10249
10250 seq_printf(sf, "nr_bursts %d\n", cfs_b->nr_burst);
10251 seq_printf(sf, "burst_time %llu\n", cfs_b->burst_time);
10252
10253 return 0;
10254 }
10255 #endif /* CONFIG_CFS_BANDWIDTH */
10256 #endif /* CONFIG_FAIR_GROUP_SCHED */
10257
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25135 bytes --]
next reply other threads:[~2021-09-10 18:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 18:28 kernel test robot [this message]
2021-09-10 18:28 ` [peterz-queue:sched/core 13/19] kernel/sched/core.c:10238:42: warning: variable 'stats' set but not used kernel test robot
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=202109110249.0mkAt6Nv-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.