lkml.org 
[lkml]   [2011]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/10] Add yaffs2 file system: Linux glue code
On Fri, 14 Jan 2011, Charles Manning wrote:

> Signed-off-by: Charles Manning <cdhmanning@gmail.com>
> ---
...
> +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@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.



\
 
 \ /
  Last update: 2011-01-20 21:17    [W:0.103 / U:27.432 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site