linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [peterz-queue:sched/core 13/19] kernel/sched/core.c:10238:42: warning: variable 'stats' set but not used
@ 2021-09-10 18:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-10 18:28 UTC (permalink / raw)
  To: Yafang Shao; +Cc: kbuild-all, linux-kernel

[-- 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 --]

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

only message in thread, other threads:[~2021-09-10 18:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).