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

From: Ram Pai
Date: Fri Sep 16 2005 - 16:39:52 EST


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.

RP
>
> > -static void *m_start(struct seq_file *m, loff_t *pos)
> > +static void *m_start(struct seq_file *m, loff_t * pos)
>
> As Ben said.
>
> > list_for_each(p, &n->list)
> > - if (!l--)
> > - return list_entry(p, struct vfsmount, mnt_list);
> > + if (!l--)
> > + return list_entry(p, struct vfsmount, mnt_list);
>
> Indenting with four spaces is a bit of a pain. Presumably because Lindent
> doesn't know what list_for_each() does.
>
> > -static void *m_next(struct seq_file *m, void *v, loff_t *pos)
> > +static void *m_next(struct seq_file *m, void *v, loff_t * pos)
>
> Again.
>
> > struct seq_operations mounts_op = {
> > - .start = m_start,
> > - .next = m_next,
> > - .stop = m_stop,
> > - .show = show_vfsmnt
> > + .start = m_start,
> > + .next = m_next,
> > + .stop = m_stop,
> > + .show = show_vfsmnt
> > };
>
> Arguable.
>
> > -repeat:
> > + repeat:
>
> Labels go in column zero.
>
> > -dput_and_out:
> > + dput_and_out:
>
> ugh, here it went and inserted spaces.
>
> > - while(d_mountpoint(nd->dentry) && follow_down(&nd->mnt, &nd->dentry))
> > - ;
> > + while (d_mountpoint(nd->dentry) && follow_down(&nd->mnt, &nd->dentry)) ;
>
> Regression!
>
> > - error = __user_walk(new_root, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &new_nd);
> > + error =
> > + __user_walk(new_root, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &new_nd);
>
> ug.
>
> > ...
>
> etc.
>
> One approach is to run Lindent, then go through the diff and fix it up by
> hand. Then apply the patch and fix up the remaining Lindent mistakes by
> hand. But the raw output of Lindent isn't right.

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