Skip to content

Commit 5986f6b

Browse files
YueHaibingmpe
authored andcommitted
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 <yuehaibing@huawei.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220308100928.23540-1-yuehaibing@huawei.com
1 parent d601fd2 commit 5986f6b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • arch/powerpc/platforms/cell/spufs

arch/powerpc/platforms/cell/spufs/sched.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,7 @@ void spuctx_switch_state(struct spu_context *ctx,
10521052
}
10531053
}
10541054

1055+
#ifdef CONFIG_PROC_FS
10551056
static int show_spu_loadavg(struct seq_file *s, void *private)
10561057
{
10571058
int a, b, c;
@@ -1073,7 +1074,8 @@ static int show_spu_loadavg(struct seq_file *s, void *private)
10731074
atomic_read(&nr_spu_contexts),
10741075
idr_get_cursor(&task_active_pid_ns(current)->idr) - 1);
10751076
return 0;
1076-
};
1077+
}
1078+
#endif
10771079

10781080
int __init spu_sched_init(void)
10791081
{

0 commit comments

Comments
 (0)