mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
inode/i_private: remove all unnecessary cast for i_private
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
+22
-22
@@ -852,7 +852,7 @@ static int unionfs_open(FAR struct file *filep, FAR const char *relpath,
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
finfo("Opening: ui_nopen=%d\n", ui->ui_nopen);
|
||||
|
||||
@@ -940,7 +940,7 @@ static int unionfs_close(FAR struct file *filep)
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
/* Get exclusive access to the file system data structures */
|
||||
|
||||
@@ -1006,7 +1006,7 @@ static ssize_t unionfs_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(ui != NULL && filep->f_priv != NULL);
|
||||
uf = (FAR struct unionfs_file_s *)filep->f_priv;
|
||||
@@ -1039,7 +1039,7 @@ static ssize_t unionfs_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(ui != NULL && filep->f_priv != NULL);
|
||||
uf = (FAR struct unionfs_file_s *)filep->f_priv;
|
||||
@@ -1071,7 +1071,7 @@ static off_t unionfs_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(ui != NULL && filep->f_priv != NULL);
|
||||
uf = (FAR struct unionfs_file_s *)filep->f_priv;
|
||||
@@ -1149,7 +1149,7 @@ static int unionfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(ui != NULL && filep->f_priv != NULL);
|
||||
uf = (FAR struct unionfs_file_s *)filep->f_priv;
|
||||
@@ -1181,7 +1181,7 @@ static int unionfs_sync(FAR struct file *filep)
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(ui != NULL && filep->f_priv != NULL);
|
||||
uf = (FAR struct unionfs_file_s *)filep->f_priv;
|
||||
@@ -1216,7 +1216,7 @@ static int unionfs_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
DEBUGASSERT(oldp != NULL && oldp->f_inode != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)oldp->f_inode->i_private;
|
||||
ui = oldp->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(ui != NULL && oldp->f_priv != NULL);
|
||||
oldpriv = (FAR struct unionfs_file_s *)oldp->f_priv;
|
||||
@@ -1282,7 +1282,7 @@ static int unionfs_fstat(FAR const struct file *filep, FAR struct stat *buf)
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(ui != NULL && filep->f_priv != NULL);
|
||||
uf = (FAR struct unionfs_file_s *)filep->f_priv;
|
||||
@@ -1320,7 +1320,7 @@ static int unionfs_fchstat(FAR const struct file *filep,
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(ui != NULL && filep->f_priv != NULL);
|
||||
uf = (FAR struct unionfs_file_s *)filep->f_priv;
|
||||
@@ -1356,7 +1356,7 @@ static int unionfs_truncate(FAR struct file *filep, off_t length)
|
||||
|
||||
/* Recover the open file data from the struct file instance */
|
||||
|
||||
ui = (FAR struct unionfs_inode_s *)filep->f_inode->i_private;
|
||||
ui = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(ui != NULL && filep->f_priv != NULL);
|
||||
uf = (FAR struct unionfs_file_s *)filep->f_priv;
|
||||
@@ -1396,7 +1396,7 @@ static int unionfs_opendir(FAR struct inode *mountpt,
|
||||
/* Recover the filesystem data from the struct inode instance */
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
udir = kmm_zalloc(sizeof(*udir));
|
||||
if (udir == NULL)
|
||||
@@ -1536,7 +1536,7 @@ static int unionfs_closedir(FAR struct inode *mountpt,
|
||||
/* Recover the union file system data from the struct inode instance */
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
/* Get exclusive access to the file system data structures */
|
||||
|
||||
@@ -1619,7 +1619,7 @@ static int unionfs_readdir(FAR struct inode *mountpt,
|
||||
/* Recover the union file system data from the struct inode instance */
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
DEBUGASSERT(dir);
|
||||
udir = (FAR struct unionfs_dir_s *)dir;
|
||||
@@ -1874,7 +1874,7 @@ static int unionfs_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir)
|
||||
/* Recover the union file system data from the struct inode instance */
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
DEBUGASSERT(dir);
|
||||
udir = (FAR struct unionfs_dir_s *)dir;
|
||||
@@ -2032,7 +2032,7 @@ static int unionfs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf)
|
||||
/* Recover the union file system data from the struct inode instance */
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL && buf != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
/* Get statfs info from file system 1.
|
||||
*
|
||||
@@ -2158,7 +2158,7 @@ static int unionfs_unlink(FAR struct inode *mountpt,
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL &&
|
||||
relpath != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
/* Check if some exists at this path on file system 1. This might be
|
||||
* a file or a directory
|
||||
@@ -2222,7 +2222,7 @@ static int unionfs_mkdir(FAR struct inode *mountpt, FAR const char *relpath,
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL &&
|
||||
relpath != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
/* Is there anything with this name on either file system? */
|
||||
|
||||
@@ -2273,7 +2273,7 @@ static int unionfs_rmdir(FAR struct inode *mountpt, FAR const char *relpath)
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL &&
|
||||
relpath != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
/* We really don't know any better so we will try to remove the directory
|
||||
* from both file systems.
|
||||
@@ -2336,7 +2336,7 @@ static int unionfs_rename(FAR struct inode *mountpt,
|
||||
/* Recover the union file system data from the struct inode instance */
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
DEBUGASSERT(oldrelpath != NULL && oldrelpath != NULL);
|
||||
|
||||
@@ -2401,7 +2401,7 @@ static int unionfs_stat(FAR struct inode *mountpt, FAR const char *relpath,
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL &&
|
||||
relpath != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
/* stat this path on file system 1 */
|
||||
|
||||
@@ -2478,7 +2478,7 @@ static int unionfs_chstat(FAR struct inode *mountpt, FAR const char *relpath,
|
||||
|
||||
DEBUGASSERT(mountpt != NULL && mountpt->i_private != NULL &&
|
||||
relpath != NULL);
|
||||
ui = (FAR struct unionfs_inode_s *)mountpt->i_private;
|
||||
ui = mountpt->i_private;
|
||||
|
||||
/* chstat this path on file system 1 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user