From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: YueHaibing <yuehaibing@huawei.com>,
"jk@ozlabs.org" <jk@ozlabs.org>, "arnd@arndb.de" <arnd@arndb.de>,
"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
"paulus@samba.org" <paulus@samba.org>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
Date: Sun, 6 Mar 2022 20:04:37 +0000 [thread overview]
Message-ID: <860002a4-4e52-c399-fda6-054fa64df3ce@csgroup.eu> (raw)
In-Reply-To: <20220305123116.26828-1-yuehaibing@huawei.com>
Le 05/03/2022 à 13:31, YueHaibing a écrit :
> 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.
Marking it as __maybe_unused doesn't fix it. It just pushes the dust
under the carpet.
proc_create_single macro should be fix to avoid that warning.
>
> Signed-off-by: YueHaibing <yuehaibing@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;
>
next prev parent reply other threads:[~2022-03-06 20:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-05 12:31 YueHaibing
2022-03-06 20:04 ` Christophe Leroy [this message]
2022-03-07 13:10 ` Arnd Bergmann
2022-03-07 13:30 ` Christophe Leroy
2022-03-08 9:51 ` YueHaibing
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=860002a4-4e52-c399-fda6-054fa64df3ce@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--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 \
--cc=yuehaibing@huawei.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®