From: YueHaibing Date: Tue, 8 Mar 2022 10:09:28 +0000 (+0800) Subject: powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n X-Git-Tag: v6.1-rc5~1734^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5986f6b6575ac830ede9648cfb64353c58067a9f;p=platform%2Fkernel%2Flinux-starfive.git powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n arch/powerpc/platforms/cell/spufs/sched.c:1055:12: warning: ‘show_spu_loadavg’ defined but not used [-Wunused-function] static int show_spu_loadavg(struct seq_file *s, void *private) ^~~~~~~~~~~~~~~~ Move it into #ifdef block to fix this, also remove unneeded semicolon. Signed-off-by: YueHaibing Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220308100928.23540-1-yuehaibing@huawei.com --- diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index d058f62..99bd027 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c @@ -1052,6 +1052,7 @@ void spuctx_switch_state(struct spu_context *ctx, } } +#ifdef CONFIG_PROC_FS static int show_spu_loadavg(struct seq_file *s, void *private) { int a, b, c; @@ -1073,7 +1074,8 @@ static int show_spu_loadavg(struct seq_file *s, void *private) atomic_read(&nr_spu_contexts), idr_get_cursor(&task_active_pid_ns(current)->idr) - 1); return 0; -}; +} +#endif int __init spu_sched_init(void) {