Re: [PATCH 09/10] Add yaffs2 file system: Linux glue code

From: Jesper Juhl
Date: Thu Jan 20 2011 - 15:14:16 EST


On Fri, 14 Jan 2011, Charles Manning wrote:

> Signed-off-by: Charles Manning <cdhmanning@xxxxxxxxx>
> ---
...
> +static int yaffs_setxattr(struct dentry *dentry, const char *name,
> + const void *value, size_t size, int flags)
> +{
> + struct inode *inode = dentry->d_inode;
> + int error = 0;
> + struct yaffs_dev *dev;
> + struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
> +

You only use the local variable 'inode' in the call to
yaffs_inode_to_obj(), so you could get rid of that local variable and just
do
struct yaffs_obj *obj = yaffs_inode_to_obj(dentry->d_inode);
this applies to a few other function in this file as well.


--
Jesper Juhl <jj@xxxxxxxxxxxxx> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

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