Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753573Ab2BDBds (ORCPT ); Fri, 3 Feb 2012 20:33:48 -0500 Received: from perches-mx.perches.com ([206.117.179.246]:45309 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750844Ab2BDBdr (ORCPT ); Fri, 3 Feb 2012 20:33:47 -0500 Message-ID: <1328319226.21255.28.camel@joe2Laptop> Subject: Re: [PATCH] checkpatch: Warn on code with 6+ tab indentation From: Joe Perches To: Linus Torvalds Cc: Andy Whitcroft , Ingo Molnar , Andrew Morton , Cyrill Gorcunov , linux-kernel@vger.kernel.org, Pavel Emelyanov , Serge Hallyn , KAMEZAWA Hiroyuki , Kees Cook , Tejun Heo , Andrew Vagin , "Eric W. Biederman" , Alexey Dobriyan , Andi Kleen , KOSAKI Motohiro , "H. Peter Anvin" , Thomas Gleixner , Glauber Costa , Matt Helsley , Pekka Enberg , Eric Dumazet , Vasiliy Kulikov , Valdis.Kletnieks@vt.edu Date: Fri, 03 Feb 2012 17:33:46 -0800 In-Reply-To: References: <20120130140905.441199885@openvz.org> <20120130141852.309402052@openvz.org> <20120203074656.GC30543@elte.hu> <20120203083530.GD1968@moon> <20120203090929.GA23996@elte.hu> <20120203012241.bcd3d0c8.akpm@linux-foundation.org> <20120203095227.GA13162@elte.hu> <20120203100743.GA3334@elte.hu> <1328311239.21255.24.camel@joe2Laptop> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.2- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1049 Lines: 28 On Fri, 2012-02-03 at 17:27 -0800, Linus Torvalds wrote: > On Fri, Feb 3, 2012 at 3:20 PM, Joe Perches wrote: > > Overly indented code should be refactored. > > Suggest refactoring excessive indentation of > > of if/else/for/do/while/switch statements. > I hate this patch. You liked the same premise, but a worse implementation, a couple years ago. https://lkml.org/lkml/2009/12/18/289 > Why? Because mindless checks like this would just lead to people > making things worse and intermixing spaces there instead. Can't happen. They'll get a different warning about mixing tabs and spaces or starting a line with spaces only. > Don't warn about things that will just result in people working around > the warnings with worse code! It merely suggests refactoring. ie: better code. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/