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: <97fc1ed63f4b4d1b6b450acf0cfc2dcad84e9ca1.camel@perches.com>
Date:   Fri, 17 Jul 2020 10:58:37 -0700
From:   Joe Perches <joe@...ches.com>
To:     Hans Verkuil <hverkuil@...all.nl>,
        Santiago Hormazabal <santiagohssl@...il.com>,
        linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        Rob Herring <robh+dt@...nel.org>,
        Ezequiel Garcia <ezequiel@...labora.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] media: Add support for the AM/FM radio chip KT0913
 from KT Micro.

On Fri, 2020-07-17 at 12:04 +0200, Hans Verkuil wrote:
> On 17/07/2020 11:51, Joe Perches wrote:
> > On Fri, 2020-07-17 at 11:29 +0200, Hans Verkuil wrote:
> > > It's standard linux codingstyle to use lowercase for hex numbers.
> > > Can you change that throughout the source for the next version?
> > 
> > Is there a standard?  It's not in coding-style.rst.
> > 
> > While I prefer lowercase too, it seems the kernel has
> > only ~2:1 preference for lowercase to uppercase hex.
> > 
> > $ git grep -ohP '\b0[xX][0-9a-f]+\b' | grep [a-f] | wc -l
> > 1149833
> > $ git grep -ohP '\b0[xX][0-9A-F]+\b' | grep [A-F] | wc -l
> > 575781
> > 
> Well, it's indeed not a standard for the kernel as a whole, but certainly
> for drivers/media:
> 
> $ git grep -ohP '\b0[xX][0-9a-f]+\b' drivers/media/ | grep [a-f] | wc -l
> 109272
> $ git grep -ohP '\b0[xX][0-9A-F]+\b' drivers/media/ | grep [A-F] | wc -l
> 22392
> 
> The media subsystem has a 5:1 preference for lowercase. And uppercase is
> mostly found in older drivers.
> Still, I really prefer lowercase over uppercase, especially in new drivers.

That's certainly any maintainer's preference right.

Slightly unrelated:

The last 100k commits have only a ~2.5:1 use of
lowercase to uppercase hex constants.

While my cut-off for declaring something a generic
kernel style standard is also ~5:1, this isn't a
style check I would put into checkpatch as the
per-subsystem variability is quite high.

cheers, Joe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ