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: <20250306-dexterous-goshawk-of-aptitude-e4f1f6@krzk-bin>
Date: Thu, 6 Mar 2025 09:38:32 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Dragan Simic <dsimic@...jaro.org>
Cc: robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org, 
	heiko@...ech.de, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] docs: dt-bindings: Specify ordering for properties
 within groups

On Wed, Mar 05, 2025 at 10:53:48AM +0100, Dragan Simic wrote:
> Hello Krzysztof,
> 
> On 2025-03-05 10:36, Krzysztof Kozlowski wrote:
> > On 05/03/2025 09:45, Dragan Simic wrote:
> > > 
> > > diff --git a/Documentation/devicetree/bindings/dts-coding-style.rst
> > > b/Documentation/devicetree/bindings/dts-coding-style.rst
> > > index 8a68331075a0..15de3ede2d9c 100644
> > > --- a/Documentation/devicetree/bindings/dts-coding-style.rst
> > > +++ b/Documentation/devicetree/bindings/dts-coding-style.rst
> > > @@ -133,6 +133,12 @@ The above-described ordering follows this
> > > approach:
> > >  3. Status is the last information to annotate that device node is
> > > or is not
> > >     finished (board resources are needed).
> > > 
> > > +The above-described ordering specifies the preferred ordering of
> > > property
> > > +groups, while the individual properties inside each group shall use
> > > natural
> > > +sort order by the property name.  More specifically, natural sort
> > > order shall
> > > +apply to multi-digit numbers found inside the property names, while
> > > alpha-
> > > +numerical ordering shall apply otherwise.
> > 
> > The last sentence was not here and I don't get the point. Natural sort
> > order should be always preferred over alpha-numerical for properties.
> > About which other case ("...apply otherwise.") are you thinking?
> 
> Yes, I added that sentence in the v2 to, hopefully, clarify the natural
> sort order itself a bit.  I've researched the natural sort order a bit
> further, and it technically applies only to the multi-digit numbers found
> inside the sorted strings.  That's what I wanted to explain, and "shall

Natural sort applies to everywhere. It's just the same as
alpha-numerical sort for single digits.

> apply otherwise" refers to applying the alpha-numerical sort order to the
> remainders of the sorted strings, i.e. to everything but the multi-digit
> numbers found in the property names.

Sorry, still don't get. What would be the difference if for remainders
of properties you would also apply natural sort instead of
alphanumerical sort?

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ