All of lore.kernel.org
 help / color / mirror / Atom feed
* [cgroup:for-4.15 8/8] kernel/cgroup/cgroup.c:3360: warning: unused variable 'cgrp'
@ 2017-10-26 22:01 kbuild test robot
       [not found] ` <201710270642.JXcfWPVR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2017-10-26 22:01 UTC (permalink / raw)
  To: Tejun Heo; +Cc: kbuild-all-JC7UmRfGjtg, cgroups-u79uwXL29TY76Z2rM5mHXA

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-4.15
head:   d41bf8c9deaed1a90b18d3ffc5639d4c19f0259a
commit: d41bf8c9deaed1a90b18d3ffc5639d4c19f0259a [8/8] cgroup, sched: Move basic cpu stats from cgroup.stat to cpu.stat
config: x86_64-randconfig-a0-10270506 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        git checkout d41bf8c9deaed1a90b18d3ffc5639d4c19f0259a
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   kernel/cgroup/cgroup.c: In function 'cpu_stat_show':
>> kernel/cgroup/cgroup.c:3360: warning: unused variable 'cgrp'

vim +/cgrp +3360 kernel/cgroup/cgroup.c

  3357	
  3358	static int cpu_stat_show(struct seq_file *seq, void *v)
  3359	{
> 3360		struct cgroup *cgrp = seq_css(seq)->cgroup;
  3361		int ret = 0;
  3362	
  3363		cgroup_stat_show_cputime(seq);
  3364	#ifdef CONFIG_CGROUP_SCHED
  3365		ret = cgroup_extra_stat_show(seq, cgrp, cpu_cgrp_id);
  3366	#endif
  3367		return ret;
  3368	}
  3369	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

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

* [PATCH cgroup/for-4.15] cgroup: mark @cgrp __maybe_unused in cpu_stat_show()
       [not found] ` <201710270642.JXcfWPVR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2017-10-30 15:16   ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2017-10-30 15:16 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all-JC7UmRfGjtg, cgroups-u79uwXL29TY76Z2rM5mHXA

From c3ba13298709f46e72b22d087d0aa02bd012e4b0 Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Date: Mon, 30 Oct 2017 08:13:14 -0700

The local variable @cgrp isn't used if !CONFIG_CGROUP_SCHED.  Mark the
variable with __maybe_unused to avoid a compile warning.

Reported-by: "kbuild-all-JC7UmRfGjtg@public.gmane.org" <kbuild-all-JC7UmRfGjtg@public.gmane.org>
Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
Applied to cgroup/for-4.15.

Thanks.

 kernel/cgroup/cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index d9773e4..d6ed725 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -3357,7 +3357,7 @@ static int __maybe_unused cgroup_extra_stat_show(struct seq_file *seq,
 
 static int cpu_stat_show(struct seq_file *seq, void *v)
 {
-	struct cgroup *cgrp = seq_css(seq)->cgroup;
+	struct cgroup __maybe_unused *cgrp = seq_css(seq)->cgroup;
 	int ret = 0;
 
 	cgroup_stat_show_cputime(seq);
-- 
2.9.5

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

end of thread, other threads:[~2017-10-30 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 22:01 [cgroup:for-4.15 8/8] kernel/cgroup/cgroup.c:3360: warning: unused variable 'cgrp' kbuild test robot
     [not found] ` <201710270642.JXcfWPVR%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-10-30 15:16   ` [PATCH cgroup/for-4.15] cgroup: mark @cgrp __maybe_unused in cpu_stat_show() Tejun Heo

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.