mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 v2 -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
Date: Tue, 8 Mar 2022 10:17:37 +0000	[thread overview]
Message-ID: <0d55feb0-e77d-1a10-cfe0-b3302872d407@csgroup.eu> (raw)
In-Reply-To: <20220308100928.23540-1-yuehaibing@huawei.com>



Le 08/03/2022 à 11:09, 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)
>              ^~~~~~~~~~~~~~~~
> 
> 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>

> ---
> 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)
>   {

  reply	other threads:[~2022-03-08 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 10:09 YueHaibing
2022-03-08 10:17 ` Christophe Leroy [this message]
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=0d55feb0-e77d-1a10-cfe0-b3302872d407@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®