Re: [PATCH v2 3/3] asus-laptop: cleanup is_visible

2015-01-21 Thread Darren Hart
On Tue, Jan 20, 2015 at 01:20:36PM -0500, Vivien Didelot wrote: > Hi Corentin, > > > > Use the attribute indexes and concise the if statements. > > > > > Why ? I really don't see that as an improvement. > > The improvement is code clarity and maintainability. I'm not use we want > to keep multipl

Re: [PATCH v2 3/3] asus-laptop: cleanup is_visible

2015-01-20 Thread Vivien Didelot
Hi Corentin, > > Use the attribute indexes and concise the if statements. > > > Why ? I really don't see that as an improvement. The improvement is code clarity and maintainability. I'm not use we want to keep multiple returns and this goto thing. I think per-attribute if-statements are clearer.

Re: [PATCH v2 3/3] asus-laptop: cleanup is_visible

2015-01-20 Thread Corentin Chary
On Sun, Jan 18, 2015 at 11:25 PM, Vivien Didelot wrote: > > Use the attribute indexes and concise the if statements. Why ? I really don't see that as an improvement. > Signed-off-by: Vivien Didelot > --- > drivers/platform/x86/asus-laptop.c | 98 > -- > 1 f

[PATCH v2 3/3] asus-laptop: cleanup is_visible

2015-01-18 Thread Vivien Didelot
Use the attribute indexes and concise the if statements. Signed-off-by: Vivien Didelot --- drivers/platform/x86/asus-laptop.c | 98 -- 1 file changed, 40 insertions(+), 58 deletions(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/as