]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
cgroup: mark cgroup_get() with __maybe_unused
authorTejun Heo <tj@kernel.org>
Mon, 1 May 2017 19:24:14 +0000 (15:24 -0400)
committerTejun Heo <tj@kernel.org>
Mon, 1 May 2017 19:24:14 +0000 (15:24 -0400)
a590b90d472f ("cgroup: fix spurious warnings on cgroup_is_dead() from
cgroup_sk_alloc()") converted most cgroup_get() usages to
cgroup_get_live() leaving cgroup_sk_alloc() the sole user of
cgroup_get().  When !CONFIG_SOCK_CGROUP_DATA, this ends up triggering
unused warning for cgroup_get().

Silence the warning by adding __maybe_unused to cgroup_get().

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: http://lkml.kernel.org/r/20170501145340.17e8ef86@canb.auug.org.au
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup.c

index 38d9386f46e775ba639ea1e8104b70669d487395..f2bcc11b85beecb8a03cb1aefd570e740abb23bf 100644 (file)
@@ -436,7 +436,7 @@ struct cgroup_subsys_state *cgroup_get_e_css(struct cgroup *cgrp,
        return css;
 }
 
-static void cgroup_get(struct cgroup *cgrp)
+static void __maybe_unused cgroup_get(struct cgroup *cgrp)
 {
        css_get(&cgrp->self);
 }