Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758913AbYBXEa0 (ORCPT ); Sat, 23 Feb 2008 23:30:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751645AbYBXEaQ (ORCPT ); Sat, 23 Feb 2008 23:30:16 -0500 Received: from hawking.rebel.net.au ([203.20.69.83]:34002 "EHLO hawking.rebel.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751433AbYBXEaO (ORCPT ); Sat, 23 Feb 2008 23:30:14 -0500 Message-ID: <47C0E2FC.6040809@davidnewall.com> Date: Sun, 24 Feb 2008 13:52:36 +1030 From: David Newall User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: Jan Engelhardt CC: Ray Lee , Linus Torvalds , Al Viro , Krzysztof Halasa , Adrian Bunk , Roland Dreier , Glenn Streiff , Faisal Latif , linux-kernel@vger.kernel.org, general@lists.openfabrics.org, Andrew Morton , Greg Kroah-Hartman Subject: Re: Merging of completely unreviewed drivers References: <5E701717F2B2ED4EA60F87C8AA57B7CC0794FFF1@venom2> <5E701717F2B2ED4EA60F87C8AA57B7CC0794FFFF@venom2> <20080221154951.GA28328@cs181133002.pp.htv.fi> <20080221210124.GD28328@cs181133002.pp.htv.fi> <47BE2985.6020305@davidnewall.com> <20080222020615.GE27894@ZenIV.linux.org.uk> <2c0942db0802212237t41da54b4h2aa2b052b7633f53@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 770 Lines: 41 Jan Engelhardt wrote: > static void blah(void) > { > if (foo) { > bar; > bar2; > return; > } > if (this) { > that; > that2; > return; > } > /* yay, got rid of two levels of indent! */ > good day; > good day2; > } I like this style. It's more readable than the alternative that you showed. If you hate returns mid-procedure, as some purists do, the following is also good: static void blah(void) { if (foo) { bar; bar2; } else if (this) { that; that2; } else { good day; good day2; } } -- 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/