From patchwork Wed Sep 21 21:54:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Corbet X-Patchwork-Id: 76715 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp2274114qgf; Wed, 21 Sep 2016 14:55:38 -0700 (PDT) X-Received: by 10.66.183.108 with SMTP id el12mr60657142pac.102.1474494938115; Wed, 21 Sep 2016 14:55:38 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zn7si8753194pab.211.2016.09.21.14.55.37; Wed, 21 Sep 2016 14:55:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932633AbcIUVzf (ORCPT + 27 others); Wed, 21 Sep 2016 17:55:35 -0400 Received: from tex.lwn.net ([70.33.254.29]:45198 "EHLO vena.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754107AbcIUVzd (ORCPT ); Wed, 21 Sep 2016 17:55:33 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by vena.lwn.net (Postfix) with ESMTP id 195DF154003C; Wed, 21 Sep 2016 15:54:07 -0600 (MDT) Date: Wed, 21 Sep 2016 15:54:01 -0600 From: Jonathan Corbet To: LKML Cc: linux-doc@vger.kernel.org, Jean Delvare , Christian Borntraeger Subject: [PATCH] docs: Remove space-before-label guidance from CodingStyle Message-ID: <20160921155401.7acd5a47@lwn.net> Organization: LWN.net X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Jonathan Corbet --- Documentation/CodingStyle | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.7.4 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;