All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: Remove space-before-label guidance from CodingStyle
@ 2016-09-21 21:54 Jonathan Corbet
  2016-09-21 22:43 ` Joe Perches
  2016-09-22  9:27 ` Jean Delvare
  0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Corbet @ 2016-09-21 21:54 UTC (permalink / raw)
  To: LKML; +Cc: linux-doc, Jean Delvare, Christian Borntraeger

Recent discussion has made it clear that there is no community consensus
on this particular rule.  Remove it now, lest it inspire yet another set
of unwanted "cleanup" patches.

This partially reverts 865a1caa4b6b (CodingStyle: Clarify and complete
chapter 7).

Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 Documentation/CodingStyle | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 852253c932fe..9c61c039ccd9 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -451,9 +451,6 @@ Avoid using GW-BASIC names like ``err1:`` and
``err2:``, as you would have to renumber them if you ever add or remove
exit paths, and they make correctness difficult to verify anyway.
 
-It is advised to indent labels with a single space (not tab), so that
-``diff -p`` does not confuse labels with functions.
-
 The rationale for using gotos is:
 
 - unconditional statements are easier to understand and follow
@@ -481,7 +478,7 @@ The rationale for using gotos is:
 			goto out_buffer;
 		}
 		...
-	 out_free_buffer:
+	out_free_buffer:
 		kfree(buffer);
 		return result;
 	}
@@ -490,7 +487,7 @@ A common type of bug to be aware of is ``one err
bugs`` which look like this: 
 .. code-block:: c
 
-	 err:
+	err:
 		kfree(foo->bar);
 		kfree(foo);
 		return ret;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: Remove space-before-label guidance from CodingStyle
  2016-09-21 21:54 [PATCH] docs: Remove space-before-label guidance from CodingStyle Jonathan Corbet
@ 2016-09-21 22:43 ` Joe Perches
  2016-09-22  9:27 ` Jean Delvare
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2016-09-21 22:43 UTC (permalink / raw)
  To: Jonathan Corbet, LKML; +Cc: linux-doc, Jean Delvare, Christian Borntraeger

On Wed, 2016-09-21 at 15:54 -0600, Jonathan Corbet wrote:
> Recent discussion has made it clear that there is no community consensus
> on this particular rule.  Remove it now, lest it inspire yet another set
> of unwanted "cleanup" patches.

Thanks.  I believe it's better to remove this one too.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: Remove space-before-label guidance from CodingStyle
  2016-09-21 21:54 [PATCH] docs: Remove space-before-label guidance from CodingStyle Jonathan Corbet
  2016-09-21 22:43 ` Joe Perches
@ 2016-09-22  9:27 ` Jean Delvare
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2016-09-22  9:27 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: LKML, linux-doc, Christian Borntraeger

Hi Jonathan,

On Wed, 21 Sep 2016 15:54:01 -0600, Jonathan Corbet wrote:
> Recent discussion has made it clear that there is no community consensus
> on this particular rule.  Remove it now, lest it inspire yet another set
> of unwanted "cleanup" patches.
> 
> This partially reverts 865a1caa4b6b (CodingStyle: Clarify and complete
> chapter 7).
> (...)
> @@ -481,7 +478,7 @@ The rationale for using gotos is:
>  			goto out_buffer;
>  		}
>  		...
> -	 out_free_buffer:
> +	out_free_buffer:
>  		kfree(buffer);
>  		return result;
>  	}
> @@ -490,7 +487,7 @@ A common type of bug to be aware of is ``one err
> bugs`` which look like this: 
>  .. code-block:: c
>  
> -	 err:
> +	err:
>  		kfree(foo->bar);
>  		kfree(foo);
>  		return ret;

There are 2 more occurrences after this point, which you probably want
to change too.

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-22  9:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21 21:54 [PATCH] docs: Remove space-before-label guidance from CodingStyle Jonathan Corbet
2016-09-21 22:43 ` Joe Perches
2016-09-22  9:27 ` Jean Delvare

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.