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: <43b01411-5125-4e23-a6ed-d9e818944557@paulmck-laptop>
Date: Sun, 18 Jan 2026 11:12:28 -0800
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Alexey Dobriyan <adobriyan@...il.com>,
	Andy Shevchenko <andriy.shevchenko@...el.com>,
	James Bottomley <James.Bottomley@...senpartnership.com>,
	ksummit@...ts.linux.dev, Dan Williams <dan.j.williams@...el.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: Clarifying confusion of our variable placement rules caused by
 cleanup.h

On Sun, Jan 18, 2026 at 11:04:54AM -0500, Steven Rostedt wrote:
> On Sat, 17 Jan 2026 19:23:07 +0300
> Alexey Dobriyan <adobriyan@...il.com> wrote:
> 
> > Such rules for headers are mostly harmless -- headers are supposed to be
> > idempotent so ordering doesn't matter. But if ordering doesn't matter
> > why have a rule at all?
> 
> As I mentioned, for aesthetic reasons only. If code is easy to look at,
> it's easier to review. Especially for those with OCD ;-)
> 
> > 
> > Duplicate header are trivially caught by tooling.
> > 
> > But such rules aren't useful either -- I've seen that Python IDEs hide
> > import list by default (and probably manage it) because it is not "real"
> > code.
> > 
> > Rules for initializers can be harmful because ordering affects code
> > generation.
> 
> I agree. I still prefer the upside-down x-mas tree approach for
> declaring variables, but obviously if they also get initialized, then
> that trumps aesthetic reasoning.

Alphabetic order.  Works for Kconfig "select" statements.  ;-)

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ