Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488431

[PATCH] docs: Remove space-before-label guidance from CodingStyle

Path csiph.com!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Jonathan Corbet <corbet@lwn.net>
Newsgroups linux.kernel
Subject [PATCH] docs: Remove space-before-label guidance from CodingStyle
Date Thu, 22 Sep 2016 00:00:02 +0200
Message-ID <sjXIC-5Zf-9@gated-at.bofh.it> (permalink)
Organization LWN.net
X-Mailer Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-redhat-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 8bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 47
X-Original-Cc linux-doc@vger.kernel.org, Jean Delvare <jdelvare@suse.de>, Christian Borntraeger <borntraeger@de.ibm.com>
X-Original-Date Wed, 21 Sep 2016 15:54:01 -0600
X-Original-Message-ID <20160921155401.7acd5a47@lwn.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1488431

Show key headers only | View raw


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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] docs: Remove space-before-label guidance from CodingStyle Jonathan Corbet <corbet@lwn.net> - 2016-09-22 00:00 +0200
  Re: [PATCH] docs: Remove space-before-label guidance from  CodingStyle Joe Perches <joe@perches.com> - 2016-09-22 00:50 +0200
  Re: [PATCH] docs: Remove space-before-label guidance from  CodingStyle Jean Delvare <jdelvare@suse.de> - 2016-09-22 11:30 +0200

csiph-web