Re: [RFC PATCH 1/10] vfs: Lindentified namespace.c

From: Al Viro
Date: Sat Sep 17 2005 - 07:35:35 EST


On Sat, Sep 17, 2005 at 02:18:48PM +0200, J?rn Engel wrote:
> On Fri, 16 September 2005 14:39:15 -0700, Ram Pai wrote:
> > On Fri, 2005-09-16 at 14:25, Andrew Morton wrote:
> > > linuxram@xxxxxxxxxx (Ram) wrote:
> > > >
> > > > Lindentified fs/namespace.c
> > >
> > > For something which is as already-close to CodingStyle as namespace.c it's
> > > probably better to tidy it up by hand. Lindent breaks almost as much stuff
> > > as it fixes.
> >
> > I thought Lindent was the gospel for codying style. Looks like its not.
> > Will fix all of them.
>
> It is an approximation. In my personal experience, the "-l80"
> parameter is doing a lot of harm. It causes things like
>
> if (...)
> for (...)
> while (...)
> if (...)
> for (...)
> while (...)
> some_function(argument,
> very_long_argument,
> another_argument,
> 0,
> 1,
> NULL
> );
>

... show up as unreadable crap they are. I fail to see a problem...
Fix them and run Lindent again, that's it.

Lindent behaviour wrt labels is far more annoying, ditto for the mess it
often makes out of prototypes (demonstrated in the patch in question).

IME the best way to use Lindent is to do vi -c 's/[[:space:]]*$//|x' foo.c
first, then run Lindent, then walk through prototypes and fix them,
diff with pre-Lindent version and see if it looks sane...
-
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/