All of lore.kernel.org
 help / color / mirror / Atom feed
* [tip:sched/core 13/47] kernel/sched/core.c:10400:42: error: variable 'stats' set but not used
@ 2021-10-10  1:37 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-10-10  1:37 UTC (permalink / raw)
  To: Yafang Shao; +Cc: kbuild-all, linux-kernel, x86, Peter Zijlstra

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tip:sched/core 13/47] kernel/sched/core.c:10400:42: error: variable 'stats' set but not used
@ 2021-10-10  1:37 ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-10-10  1:37 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2956 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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38267 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [tip:sched/core 13/47] kernel/sched/core.c:10400:42: error: variable 'stats' set but not used
  2021-10-10  1:37 ` kernel test robot
@ 2021-10-10  9:59   ` Yafang Shao
  -1 siblings, 0 replies; 6+ messages in thread
From: Yafang Shao @ 2021-10-10  9:59 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, LKML, x86, Peter Zijlstra

On Sun, Oct 10, 2021 at 9:38 AM kernel test robot <lkp@intel.com> wrote:
>
> 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):

It is a  W=1 warning.
It seems that we don't need to fix the warning.

>         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



-- 
Thanks
Yafang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [tip:sched/core 13/47] kernel/sched/core.c:10400:42: error: variable 'stats' set but not used
@ 2021-10-10  9:59   ` Yafang Shao
  0 siblings, 0 replies; 6+ messages in thread
From: Yafang Shao @ 2021-10-10  9:59 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3473 bytes --]

On Sun, Oct 10, 2021 at 9:38 AM kernel test robot <lkp@intel.com> wrote:
>
> 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):

It is a  W=1 warning.
It seems that we don't need to fix the warning.

>         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(a)lists.01.org



-- 
Thanks
Yafang

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [tip:sched/core 13/47] kernel/sched/core.c:10400:42: error: variable 'stats' set but not used
  2021-10-10  9:59   ` Yafang Shao
@ 2021-10-10 10:57     ` Peter Zijlstra
  -1 siblings, 0 replies; 6+ messages in thread
From: Peter Zijlstra @ 2021-10-10 10:57 UTC (permalink / raw)
  To: Yafang Shao; +Cc: kernel test robot, kbuild-all, LKML, x86, arnd

On Sun, Oct 10, 2021 at 05:59:54PM +0800, Yafang Shao wrote:
> On Sun, Oct 10, 2021 at 9:38 AM kernel test robot <lkp@intel.com> wrote:
> >
> > 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):
> 
> It is a  W=1 warning.
> It seems that we don't need to fix the warning.

Right, and I asked 0day people to stop sending W=1 warnings, but they
just keep going on and on.

Arnd, any way we can 'promote' that warning to W=2?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [tip:sched/core 13/47] kernel/sched/core.c:10400:42: error: variable 'stats' set but not used
@ 2021-10-10 10:57     ` Peter Zijlstra
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Zijlstra @ 2021-10-10 10:57 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

On Sun, Oct 10, 2021 at 05:59:54PM +0800, Yafang Shao wrote:
> On Sun, Oct 10, 2021 at 9:38 AM kernel test robot <lkp@intel.com> wrote:
> >
> > 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):
> 
> It is a  W=1 warning.
> It seems that we don't need to fix the warning.

Right, and I asked 0day people to stop sending W=1 warnings, but they
just keep going on and on.

Arnd, any way we can 'promote' that warning to W=2?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-10 10:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-10  1:37 [tip:sched/core 13/47] kernel/sched/core.c:10400:42: error: variable 'stats' set but not used kernel test robot
2021-10-10  1:37 ` kernel test robot
2021-10-10  9:59 ` Yafang Shao
2021-10-10  9:59   ` Yafang Shao
2021-10-10 10:57   ` Peter Zijlstra
2021-10-10 10:57     ` Peter Zijlstra

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.