From: YueHaibing <yuehaibing@huawei.com> To: <jk@ozlabs.org>, <arnd@arndb.de>, <mpe@ellerman.id.au>, <benh@kernel.crashing.org>, <paulus@samba.org>, <yuehaibing@huawei.com>, <christophe.leroy@csgroup.eu> Cc: <linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v2 -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n Date: Tue, 8 Mar 2022 18:09:28 +0800 [thread overview] Message-ID: <20220308100928.23540-1-yuehaibing@huawei.com> (raw) 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> --- v2: use #ifdef instead of __maybe_unused --- arch/powerpc/platforms/cell/spufs/sched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index d058f6233e66..99bd027a7f7c 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) { -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com> To: <jk@ozlabs.org>, <arnd@arndb.de>, <mpe@ellerman.id.au>, <benh@kernel.crashing.org>, <paulus@samba.org>, <yuehaibing@huawei.com>, <christophe.leroy@csgroup.eu> Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n Date: Tue, 8 Mar 2022 18:09:28 +0800 [thread overview] Message-ID: <20220308100928.23540-1-yuehaibing@huawei.com> (raw) 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> --- v2: use #ifdef instead of __maybe_unused --- arch/powerpc/platforms/cell/spufs/sched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index d058f6233e66..99bd027a7f7c 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) { -- 2.17.1
next reply other threads:[~2022-03-08 10:13 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-08 10:09 YueHaibing [this message] 2022-03-08 10:09 ` [PATCH v2 -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n YueHaibing 2022-03-08 10:17 ` Christophe Leroy 2022-03-12 10:29 ` Michael Ellerman
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220308100928.23540-1-yuehaibing@huawei.com \ --to=yuehaibing@huawei.com \ --cc=arnd@arndb.de \ --cc=benh@kernel.crashing.org \ --cc=christophe.leroy@csgroup.eu \ --cc=jk@ozlabs.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=mpe@ellerman.id.au \ --cc=paulus@samba.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.