LKML Archive on
help / color / mirror / Atom feed
From: Jonathan Corbet <>
To: Gary R Hook <>
	Jani Nikula <>
Subject: Re: [PATCH v2] Documentation/CodingStyle: Add an example for braces
Date: Wed, 21 Mar 2018 09:17:01 -0600	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <152114372879.3142.8833111074324091904.stgit@taos>

On Thu, 15 Mar 2018 15:04:02 -0500
Gary R Hook <> wrote:

> +Do use braces when a body is more complex than a single simple statement:
> +
> +.. code-block:: c
> +
> +	if (condition) {
> +		if (another_condition)
> +			do_something();
> +	}

Somebody is sure to complain at some point that this should really be:

	if (condition && another_condition)

To head that off, I think I'll apply your first version instead, sorry

In general I'm pretty reluctant to apply coding-style patches for the
simple reason that I sure don't want to be the arbitrator of proper kernel
style.  This one seems to fit well within the accepted norms, though.



  reply	other threads:[~2018-03-21 15:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 20:04 [PATCH v2] Documentation/CodingStyle: Add an example for braces Gary R Hook
2018-03-21 15:17 ` Jonathan Corbet [this message]
2018-03-22  9:12   ` Jani Nikula
2018-03-26 16:28     ` Gary R Hook
2018-03-26 16:32       ` Jonathan Corbet
2018-03-26 16:49         ` Gary R Hook

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:

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

  git send-email \ \ \ \ \ \ \

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).