lkml.org 
[lkml]   [2012]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] gpiolib: Refactor gpio_export
From
On Mon, Oct 22, 2012 at 2:39 AM, Ryan Mallon <rmallon@gmail.com> 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.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2012-10-23 01:01    [W:0.041 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site