Re: [PATCH v2] gpiolib: Refactor gpio_export

From: Ryan Mallon
Date: Mon Oct 22 2012 - 18:15:23 EST

On 23/10/12 09:13, Linus Walleij wrote:
> On Mon, Oct 22, 2012 at 2:39 AM, Ryan Mallon <rmallon@xxxxxxxxx> 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!


>> 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 <rmallon@xxxxxxxxx>


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at