Skip to content

Commit

Permalink
powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
Browse files Browse the repository at this point in the history
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
  • Loading branch information
YueHaibing authored and Michael Ellerman committed Mar 8, 2022
1 parent d601fd2 commit 5986f6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down

0 comments on commit 5986f6b

Please sign in to comment.