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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <52d144d1-ffda-4b41-9ed5-2a4fcd4f08d7@app.fastmail.com>
Date: Sat, 05 Apr 2025 11:16:19 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Andy Shevchenko" <andriy.shevchenko@...ux.intel.com>,
 linux-kernel@...r.kernel.org
Cc: "Peter Zijlstra" <peterz@...radead.org>, "Ingo Molnar" <mingo@...hat.com>,
 "Will Deacon" <will@...nel.org>, "Boqun Feng" <boqun.feng@...il.com>,
 "Waiman Long" <longman@...hat.com>
Subject: Re: [PATCH v1 1/1] sched/fair: Mark some static const with __maybe_unused

On Fri, Apr 4, 2025, at 18:52, Andy Shevchenko wrote:
> GCC considers that some static const defined in the lockdep_internals.h
> are unused, which prevents `make W=1` and CONFIG_WERROR=y builds:
>
> kernel/locking/lockdep_internals.h:69:28: error: 
> ‘LOCKF_USED_IN_IRQ_READ’ defined but not used 
> [-Werror=unused-const-variable=]
>    69 | static const unsigned long LOCKF_USED_IN_IRQ_READ =
>       |                            ^~~~~~~~~~~~~~~~~~~~~~
> kernel/locking/lockdep_internals.h:63:28: error: 
> ‘LOCKF_ENABLED_IRQ_READ’ defined but not used 
> [-Werror=unused-const-variable=]
>    63 | static const unsigned long LOCKF_ENABLED_IRQ_READ =
>       |                            ^~~~~~~~~~~~~~~~~~~~~~
> kernel/locking/lockdep_internals.h:57:28: error: ‘LOCKF_USED_IN_IRQ’ 
> defined but not used [-Werror=unused-const-variable=]
>    57 | static const unsigned long LOCKF_USED_IN_IRQ =
>       |                            ^~~~~~~~~~~~~~~~~
> kernel/locking/lockdep_internals.h:51:28: error: ‘LOCKF_ENABLED_IRQ’ 
> defined but not used [-Werror=unused-const-variable=]
>    51 | static const unsigned long LOCKF_ENABLED_IRQ =
>       |                            ^~~~~~~~~~~~~~~~~
>
> Fix this by marking them with __maybe_unused.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

I posted as different patch for this a while ago:

https://lore.kernel.org/lkml/20250225200830.4031742-1-arnd@kernel.org/

Either of the two should be fine here, though I still like my
version a bit better.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ