[PATCH -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n

YueHaibing yuehaibing at huawei.com
Sat Mar 5 23:31:16 AEDT 2022


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)
            ^~~~~~~~~~~~~~~~

Mark this as __maybe_unused to fix this.

Signed-off-by: YueHaibing <yuehaibing at huawei.com>
---
 arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index d058f6233e66..c46835625133 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -1052,7 +1052,7 @@ void spuctx_switch_state(struct spu_context *ctx,
 	}
 }
 
-static int show_spu_loadavg(struct seq_file *s, void *private)
+static int __maybe_unused show_spu_loadavg(struct seq_file *s, void *private)
 {
 	int a, b, c;
 
-- 
2.17.1



More information about the Linuxppc-dev mailing list