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] [day] [month] [year] [list]
Message-ID: <7562505a-24ff-eac7-34ea-83cea5988fd0@huawei.com>
Date:   Tue, 8 Mar 2022 17:51:41 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     Christophe Leroy <christophe.leroy@...roup.eu>,
        Arnd Bergmann <arnd@...db.de>
CC:     "jk@...abs.org" <jk@...abs.org>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "benh@...nel.crashing.org" <benh@...nel.crashing.org>,
        "paulus@...ba.org" <paulus@...ba.org>,
        "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

On 2022/3/7 21:30, Christophe Leroy wrote:
> 
> 
> Le 07/03/2022 à 14:10, Arnd Bergmann a écrit :
>> On Sun, Mar 6, 2022 at 9:04 PM Christophe Leroy
>> <christophe.leroy@...roup.eu> wrote:
>>> 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.
>>
>> We discussed that when proc_create_single() was introduced, but ended up
>> not doing it that way because there were already a lot of files using an #ifdef
>> around the function definitions. To change it back, one would have to audit
>> every user of proc_create_single() and remove the #ifdefs.
>>
> 
> Fair enough.
> 
> In that case, I'd prefer to go for a #ifdef as well for 
> show_spu_loadavg() instead of going for a __maybe_unused flag.

Ok, will do that in v2.
> 
> Christophe
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ