[email protected] (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.
> -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|