All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Miguel Ojeda <ojeda@kernel.org>,
	Andy Whitcroft <apw@canonical.com>,
	Brian Norris <briannorris@chromium.org>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	Joe Perches <joe@perches.com>, Kees Cook <keescook@chromium.org>,
	Konstantin Meskhidze <konstantin.meskhidze@huawei.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Paul Moore <paul@paul-moore.com>, Tom Rix <trix@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	llvm@lists.linux.dev
Subject: Re: [PATCH v2 4/5] clang-format: Fix empty curly braces
Date: Mon, 23 May 2022 13:14:56 +0200	[thread overview]
Message-ID: <02494cb8-2aa5-1769-f28d-d7206f284e5a@digikod.net> (raw)
In-Reply-To: <CANiq72kbp3xTpj-L2BfLQ1Ecx-2Ki0W3e5YLERx8-T9bjb96=g@mail.gmail.com>



On 20/05/2022 19:15, Miguel Ojeda wrote:
> On Fri, May 6, 2022 at 6:00 PM Mickaël Salaün <mic@digikod.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

  parent reply	other threads:[~2022-05-23 12:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06 16:01 [PATCH v2 0/5] Fix clang-format configuration according to checkpatch.pl Mickaël Salaün
2022-05-06 16:01 ` [PATCH v2 1/5] clang-format: Update and extend the for_each list with tools/ Mickaël Salaün
2022-05-20 11:57   ` Miguel Ojeda
2022-05-06 16:01 ` [PATCH v2 2/5] clang-format: Update to clang-format >= 6 Mickaël Salaün
2022-05-06 16:01 ` [PATCH v2 3/5] clang-format: Fix goto labels indentation Mickaël Salaün
2022-05-20 17:07   ` Miguel Ojeda
2022-05-06 16:01 ` [PATCH v2 4/5] clang-format: Fix empty curly braces Mickaël Salaün
2022-05-20 17:15   ` Miguel Ojeda
2022-05-20 17:24     ` Joe Perches
2022-05-20 17:50       ` Miguel Ojeda
2022-05-20 18:00         ` Joe Perches
2022-05-20 18:57           ` Miguel Ojeda
2022-05-23 11:14     ` Mickaël Salaün [this message]
2022-05-06 16:01 ` [PATCH v2 5/5] clang-format: Fix space after for_each macros Mickaël Salaün
2022-05-11 15:40   ` Joe Perches
2022-05-11 17:34     ` Mickaël Salaün
2022-05-11 17:38       ` Joe Perches
2022-05-11 14:19 ` [PATCH v2 0/5] Fix clang-format configuration according to checkpatch.pl Mickaël Salaün
2022-05-11 15:29   ` Miguel Ojeda
2022-05-11 17:38     ` Brian Norris
2022-05-11 17:40     ` Mickaël Salaün
2022-05-20 19:11 ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02494cb8-2aa5-1769-f28d-d7206f284e5a@digikod.net \
    --to=mic@digikod.net \
    --cc=Jason@zx2c4.com \
    --cc=apw@canonical.com \
    --cc=briannorris@chromium.org \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=konstantin.meskhidze@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=lukas.bulwahn@gmail.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=ojeda@kernel.org \
    --cc=paul@paul-moore.com \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.