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: <02494cb8-2aa5-1769-f28d-d7206f284e5a@digikod.net>
Date:   Mon, 23 May 2022 13:14:56 +0200
From:   Mickaël Salaün <mic@...ikod.net>
To:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc:     Miguel Ojeda <ojeda@...nel.org>,
        Andy Whitcroft <apw@...onical.com>,
        Brian Norris <briannorris@...omium.org>,
        Dwaipayan Ray <dwaipayanray1@...il.com>,
        "Jason A . Donenfeld" <Jason@...c4.com>,
        Joe Perches <joe@...ches.com>,
        Kees Cook <keescook@...omium.org>,
        Konstantin Meskhidze <konstantin.meskhidze@...wei.com>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Paul Moore <paul@...l-moore.com>, Tom Rix <trix@...hat.com>,
        linux-kernel <linux-kernel@...r.kernel.org>, llvm@...ts.linux.dev
Subject: Re: [PATCH v2 4/5] clang-format: Fix empty curly braces



On 20/05/2022 19:15, Miguel Ojeda wrote:
> On Fri, May 6, 2022 at 6:00 PM Mickaël Salaün <mic@...ikod.net> wrote:
>>
>> SplitEmptyFunction [1] should be false to not add a new line in an empty
>> function body.  This follows the current kernel coding style.
> 
> I don't think this is correct. Checking headers in `include/linux/`, I
> see ~70 using {} (when not in the same line as the signature), and
> ~700 in different lines. In `kernel/`, it is even more pronounced: 4
> vs. ~200.
> 
> Am I missing something?

You're right, it is not consistent across all kernel code. Using 
one-liners is easier but after a wider counting for *.c and *.h with 
5.18 I get:
- 187 for "\n{ }\n"
- 196 for "\n{}\n"
- 1963 for ") *{}\n"
- 4554 for "\n{\n}"

Please ignore this patch, I'll do the same for my changes.

Regards,
  Mickaël

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ