Re: [PATCH v4][mmc/host]:Blackfin SD Host Controller Driver

From: Mike Frysinger
Date: Sun Nov 29 2009 - 16:39:53 EST


On Wed, Nov 25, 2009 at 17:43, Andrew Morton wrote:
> On Wed, 25 Nov 2009 17:25:20 -0500 Mike Frysinger wrote:
>> > Arguably wrong from a coding-style POV and looks weird IMO. __Adds a bit
>> > of risk that subsequent coders will think they're writing in python adn
>> > will add bugs.
>>
>> i dont really get what you're referring to here. Âthe code in question
>> looks ifne to me, and i dont see anything "python-esque" about it
>
> Code like
>
> Â Â Â Âif (expr) {
> Â Â Â Â Â Â Â Âline1;
> Â Â Â Â Â Â Â Âline2;
> Â Â Â Â} else
> Â Â Â Â Â Â Â Âline3;
>
> looks odd and can cause people to later add bugs along the lines of
>
> Â Â Â Âif (expr) {
> Â Â Â Â Â Â Â Âline1;
> Â Â Â Â Â Â Â Âline2;
> Â Â Â Â} else
> + Â Â Â Â Â Â Â line3a;
> Â Â Â Â Â Â Â Âline3;
>
> this is particularly the case if line3 is long, or is preceded by a
> comment. ÂThis has happened in the past.
>
> Adding the missing braces reduces the risk that this will occur.

*shrug* people can screw up braces regardless of how many statements
and/or branches there are. i doubt people are going to get confused
and think kernel code is python, but if you really want to be pedantic
about braces, doesnt matter that much to me.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/