Re: [PATCH v2] Documentation/CodingStyle: Add an example for braces

2018-03-26 Thread Gary R Hook
On 03/26/2018 11:32 AM, Jonathan Corbet wrote: On Mon, 26 Mar 2018 11:28:03 -0500 Gary R Hook wrote: Submitting a v3 because the example could better illuminate the options by using loop construct inside of an if, addressing Jani's point but without opening the door to later criticism. I also

Re: [PATCH v2] Documentation/CodingStyle: Add an example for braces

2018-03-26 Thread Jonathan Corbet
On Mon, 26 Mar 2018 11:28:03 -0500 Gary R Hook wrote: > Submitting a v3 because the example could better illuminate the options > by using loop construct inside of an if, addressing Jani's point but > without opening the door to later criticism. > > I also like the verbage in v2/3 better, but

Re: [PATCH v2] Documentation/CodingStyle: Add an example for braces

2018-03-26 Thread Gary R Hook
On 03/22/2018 04:12 AM, Jani Nikula wrote: On Wed, 21 Mar 2018, Jonathan Corbet wrote: To head that off, I think I'll apply your first version instead, sorry Jani. No worries. Submitting a v3 because the example could better illuminate the options by using loop construct inside of an if,

Re: [PATCH v2] Documentation/CodingStyle: Add an example for braces

2018-03-22 Thread Jani Nikula
On Wed, 21 Mar 2018, Jonathan Corbet wrote: > To head that off, I think I'll apply your first version instead, sorry > Jani. No worries. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center

Re: [PATCH v2] Documentation/CodingStyle: Add an example for braces

2018-03-21 Thread Jonathan Corbet
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 co

[PATCH v2] Documentation/CodingStyle: Add an example for braces

2018-03-15 Thread Gary R Hook
Add another example of required braces when using a compound statements. Signed-off-by: Gary R Hook --- Changes since v1: - Move the new example up, and make it more generic Documentation/process/coding-style.rst |9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/pro