[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CE54064.6010702@zytor.com>
Date: Thu, 18 Nov 2010 07:04:04 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: michael@...erman.id.au
CC: Ingo Molnar <mingo@...e.hu>, devicetree-discuss@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, Milton Miller <miltonm@....com>,
Ingo Molnar <mingo@...hat.com>,
Andres Salomon <dilinger@...ued.net>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 3/3] x86: OLPC: speed up device tree creation during boot
(v2)
On 11/18/2010 03:02 AM, Michael Ellerman wrote:
> On Thu, 2010-11-18 at 09:34 +0100, Ingo Molnar wrote:
>>
>> Look at the general balance of hardship: very little harm is done (it's not a big
>> deal if a variable is only used in a single function) but having it with local
>> variables can be _really_ harmful - for example i overlooked them when i reviewed
>> this patch. I dont like important details obscured - i like them to be apparent.
>> Again, this is something that some people can parse immediately on the visual level
>> - me and many others cannot.
>
No, sorry, this sounds like a personal preference that is well out of
line with the vast majority of C programmers I've ever come across, not
just in the Linux kernel world but outside of it.
> What about:
>
> int foo(void)
> {
> static int bar;
>
> struct thing_struct *thing;
> int other_var;
> char *p;
>
> ...
> }
>
> I think the visual wrongness of that formatting would be enough for me
> to stop and look twice. Though I guess it doesn't work if you have few,
> or no other variables other than the statics to declare.
>
I wouldn't object to a convention like that, but let's bloody well
realize that that is a brand new convention, and if this convention is
going to stick at all it needs to be made official and put in CodingStyle.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
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