Re: [PATCH 0/2]: Add sparc64 ftrace support.

From: Ingo Molnar
Date: Wed May 14 2008 - 03:19:41 EST



* David Miller <davem@xxxxxxxxxxxxx> wrote:

> From: Ingo Molnar <mingo@xxxxxxx>
> Date: Wed, 14 May 2008 09:01:48 +0200
>
> > (i also sort by length to make it visually more appealing. "Reverse
> > christmas tree" sorting ;-)
>
> I do this for local variable declarations too.

yeah, same here:

--------------------------------->
static void
ftrace_record_ip(unsigned long ip)
{
struct dyn_ftrace *node;
unsigned long flags;
unsigned long key;
int resched;
int atomic;
int cpu;
[...]
<--------------------------------

for me the primary motivation isnt even merge conflicts in this case
(getting conflicts on this level is rare), but readability and making it
smooth to move the eye off the variable declarations.

IMO good code is obvious even without having to read the types, so the
less visually intrusive the variable declarations section is, the
better.

Ingo
--
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/