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: <Z_J12Fr-0wYQvEAV@smile.fi.intel.com>
Date: Sun, 6 Apr 2025 15:38:48 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: linux-kernel@...r.kernel.org, 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 Sat, Apr 05, 2025 at 11:16:19AM +0200, Arnd Bergmann wrote:
> 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.

I'm not a fan of __maybe_unused, I just didn't come up with better idea,
you did. So, I also prefer your version. Can anybody apply that patch
from Arnd, please?

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ