[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150121181955.GA7386@vmdeb7>
Date: Wed, 21 Jan 2015 10:19:55 -0800
From: Darren Hart <dvhart@...radead.org>
To: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc: Corentin Chary <corentin.chary@...il.com>,
platform-driver-x86@...r.kernel.org,
acpi4asus-user <acpi4asus-user@...ts.sourceforge.net>,
LKML <linux-kernel@...r.kernel.org>, kernel@...oirfairelinux.com
Subject: Re: [PATCH v2 3/3] asus-laptop: cleanup is_visible
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 multiple returns and this goto thing. I think per-attribute
> if-statements are clearer.
I have to concur with Corentin, changing to numerical indices rather than the
named atrributes makes the code harder to read in my opinion, and is more likely
to lead to mistakes than not.
--
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists