cgroup: mark @cgrp __maybe_unused in cpu_stat_show()
authorTejun Heo <tj@kernel.org>
Mon, 30 Oct 2017 15:13:14 +0000 (08:13 -0700)
committerTejun Heo <tj@kernel.org>
Mon, 30 Oct 2017 15:13:14 +0000 (08:13 -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@01.org" <kbuild-all@01.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup.c

index d9773e49a1b4593db19200e365a6cd415a94293a..d6ed725f36d99d21808e41b92d99de8ad4ea2262 100644 (file)
@@ -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);