[Yaffs] [PATCH YAFFS2 3/8] sparse-fix--remove-unused

Top Page
Attachments:
Message as email
+ (text/plain)
+ 3-sparse-fix--remove-unused.diff (text/plain)
Delete this message
Reply to this message
Author: Luc Van Oostenryck
Date:  
To: yaffs
Subject: [Yaffs] [PATCH YAFFS2 3/8] sparse-fix--remove-unused
Remove never used functions and declarations.




-- Luc Van Oostenryck
diff --git a/fs/yaffs2/yaffs_fs.c b/fs/yaffs2/yaffs_fs.c
--- a/fs/yaffs2/yaffs_fs.c
+++ b/fs/yaffs2/yaffs_fs.c
@@ -701,55 +701,6 @@ struct inode *yaffs_get_inode(struct sup
     return inode;
 }


-#if 0
-
-// No longer used because we use generic rw */
-static ssize_t yaffs_file_read(struct file *f, char *buf, size_t n, loff_t *pos)
-{
-    yaffs_Object *obj;
-    int nRead,ipos;
-    struct inode *inode;
-    yaffs_Device *dev;
-    
-    T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_file_read\n"));
-
-    obj  = yaffs_DentryToObject(f->f_dentry);
-    
-    dev = obj->myDev;
-    
-    yaffs_GrossLock(dev);
-    
-    inode = f->f_dentry->d_inode;
-    
-    if (*pos < inode->i_size) 
-    {
-            if (*pos + n > inode->i_size)
-            {
-                n = inode->i_size - *pos;
-            }
-    }
-    else
-    {
-        n = 0;
-    }
-    
-    nRead = yaffs_ReadDataFromFile(obj,buf,*pos,n);
-    if(nRead > 0)
-    {
-        f->f_pos += nRead;
-    }
-    
-    yaffs_GrossUnlock(dev);
-    
-    ipos = *pos;
-    
-    T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_file_read read %d bytes, %d read at %d\n",n,nRead,ipos));
-    return nRead;
-    
-}
-
-#endif
-
 static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, loff_t *pos)
 {
     yaffs_Object *obj;