cgroup: mark cgroup_get() with __maybe_unused 09/149909/2
authorTejun Heo <tj@kernel.org>
Mon, 1 May 2017 19:24:14 +0000 (15:24 -0400)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 14 Sep 2017 03:48:10 +0000 (03:48 +0000)
commit7b40c929283167928662162443541867ac247583
tree4dc85c4367c86e87ef9944c5019a39c919277d5e
parent9c6cc2e9edbaf00d148332d083a4be08c61ba869
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>
[sw0312.kim: backport from mainline to fix build warning caused by the backported commite 54215a9bc4d ("cgroup_get() expected ...") in rpi-4.9.y]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ib70e3d4401f9e691940168ac7c4d819ab206c447
kernel/cgroup.c