Subject: Re: [PATCH] cgroup: put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED

From: Kamalesh Babulal <[email-masked]>
Date: Tue, 11 Jul 2023 12:50:15 +0530

On 7/11/23 08:08, Miaohe Lin wrote:
> Put cgroup_tryget_css() inside CONFIG_CGROUP_SCHED to fix the warning
> of 'cgroup_tryget_css' defined but not used [-Wunused-function] when
> CONFIG_CGROUP_SCHED is disabled.
> 
> Signed-off-by: Miaohe Lin <[email-masked]>
> ---
>  kernel/cgroup/cgroup.c | 44 +++++++++++++++++++++---------------------
>  1 file changed, 22 insertions(+), 22 deletions(-)

Looks good to me, given that the only caller cgroup_extra_stat_show() is
guarded within CONFIG_CGROUP_SCHED (linux-next tree), it makes sense to,
also move cgroup_tryget_css() within the same ifdef block.

Reviewed-by: Kamalesh Babulal <[email-masked]>