diff options
author | Tejun Heo <tj@kernel.org> | 2017-05-01 15:24:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-14 15:07:50 +0200 |
commit | 695b2bd64be3a3824c264e4ba32b3d3d58b7d7e8 (patch) | |
tree | 19feda3f5727a47fd9b538e026d9320362a10471 | |
parent | ba301861f686c37ad410838ffaec3255a7b7c1d9 (diff) |
cgroup: mark cgroup_get() with __maybe_unused
commit 310b4816a5d8082416b4ab83e5a7b3cb92883a4d upstream.
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>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | kernel/cgroup/cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index ab84d7d060a4..e21c9321101f 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -436,7 +436,7 @@ out_unlock: return css; } -static void cgroup_get(struct cgroup *cgrp) +static void __maybe_unused cgroup_get(struct cgroup *cgrp) { css_get(&cgrp->self); } |