From: Andrew Morton Subject: Re: [RFC PATCH 1/10] vfs: Lindentified namespace.c Date: Fri, 16 Sep 2005 14:25:57 -0700 Message-ID: <20050916142557.691b055e.akpm@osdl.org> References: <20050916182619.GA28428@RAM> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linuxram@us.ibm.com, viro@ftp.linux.org.uk, miklos@szeredi.hu, mike@waychison.com, bfields@fieldses.org, serue@us.ibm.com Return-path: Received: from smtp.osdl.org ([65.172.181.4]:41347 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1750869AbVIPV1I (ORCPT ); Fri, 16 Sep 2005 17:27:08 -0400 To: linuxram@us.ibm.com (Ram) In-Reply-To: <20050916182619.GA28428@RAM> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org linuxram@us.ibm.com (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.