lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Mar 2022 10:17:37 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     YueHaibing <yuehaibing@...wei.com>,
        "jk@...abs.org" <jk@...abs.org>, "arnd@...db.de" <arnd@...db.de>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "benh@...nel.crashing.org" <benh@...nel.crashing.org>,
        "paulus@...ba.org" <paulus@...ba.org>
CC:     "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 -next] powerpc/spufs: Fix build warning when
 CONFIG_PROC_FS=n



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@...wei.com>

Reviewed-by: Christophe Leroy <christophe.leroy@...roup.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)
>   {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ