Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932272Ab2JVWPe (ORCPT ); Mon, 22 Oct 2012 18:15:34 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:42234 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756280Ab2JVWPd (ORCPT ); Mon, 22 Oct 2012 18:15:33 -0400 Message-ID: <5085C580.1080608@gmail.com> Date: Tue, 23 Oct 2012 09:15:28 +1100 From: Ryan Mallon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-Version: 1.0 To: Linus Walleij CC: Grant Likely , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] gpiolib: Refactor gpio_export References: <508495B0.7010308@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: 1001 Lines: 31 On 23/10/12 09:13, Linus Walleij wrote: > On Mon, Oct 22, 2012 at 2:39 AM, Ryan Mallon wrote: > >> The gpio_export function uses nested if statements and the status >> variable to handle the failure cases. This makes the function logic >> difficult to follow. Refactor the code to abort immediately on failure >> using goto. This makes the code slightly longer, but significantly >> reduces the nesting and number of split lines and makes the code easier >> to read. > > Splendid, patch applied! Thanks. >> Signed-off-by: Ryan Mallon > > Interesting that you sign off without an email address, I just added it > thinking it was a mistake. Whoops. Yeah, should be: Signed-off-by: Ryan Mallon Thanks, ~Ryan -- 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/