lkml.org 
[lkml]   [2008]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/2]: Add sparc64 ftrace support.

* David Miller <davem@davemloft.net> wrote:

> From: Ingo Molnar <mingo@elte.hu>
> 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


\
 
 \ /
  Last update: 2008-05-14 09:21    [W:0.202 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site