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]
Message-ID: <860002a4-4e52-c399-fda6-054fa64df3ce@csgroup.eu>
Date:   Sun, 6 Mar 2022 20:04: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 -next] powerpc/spufs: Fix build warning when
 CONFIG_PROC_FS=n



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ