mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +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:
@@ -1000,7 +1000,7 @@ int nxffs_open(FAR struct file *filep, FAR const char *relpath,
|
||||
* file structure
|
||||
*/
|
||||
|
||||
volume = (FAR struct nxffs_volume_s *)filep->f_inode->i_private;
|
||||
volume = filep->f_inode->i_private;
|
||||
DEBUGASSERT(volume != NULL);
|
||||
|
||||
/* Limitation: A file must be opened for reading or writing, but not both.
|
||||
@@ -1066,7 +1066,7 @@ int nxffs_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
* file structure
|
||||
*/
|
||||
|
||||
volume = (FAR struct nxffs_volume_s *)oldp->f_inode->i_private;
|
||||
volume = oldp->f_inode->i_private;
|
||||
DEBUGASSERT(volume != NULL);
|
||||
#endif
|
||||
|
||||
@@ -1124,7 +1124,7 @@ int nxffs_close(FAR struct file *filep)
|
||||
|
||||
/* Recover the volume state from the open file */
|
||||
|
||||
volume = (FAR struct nxffs_volume_s *)filep->f_inode->i_private;
|
||||
volume = filep->f_inode->i_private;
|
||||
DEBUGASSERT(volume != NULL);
|
||||
|
||||
/* Get exclusive access to the volume. Note that the volume lock
|
||||
|
||||
@@ -150,7 +150,7 @@ ssize_t nxffs_read(FAR struct file *filep, FAR char *buffer, size_t buflen)
|
||||
|
||||
/* Recover the volume state from the open file */
|
||||
|
||||
volume = (FAR struct nxffs_volume_s *)filep->f_inode->i_private;
|
||||
volume = filep->f_inode->i_private;
|
||||
DEBUGASSERT(volume != NULL);
|
||||
|
||||
/* Get exclusive access to the volume. Note that the volume lock
|
||||
|
||||
@@ -190,7 +190,7 @@ int nxffs_fstat(FAR const struct file *filep, FAR struct stat *buf)
|
||||
|
||||
/* Recover the volume state from the open file */
|
||||
|
||||
volume = (FAR struct nxffs_volume_s *)filep->f_inode->i_private;
|
||||
volume = filep->f_inode->i_private;
|
||||
DEBUGASSERT(volume != NULL);
|
||||
|
||||
/* Get exclusive access to the volume. Note that the volume lock
|
||||
|
||||
@@ -65,7 +65,7 @@ int nxffs_truncate(FAR struct file *filep, off_t length)
|
||||
|
||||
/* Recover the volume state from the open file */
|
||||
|
||||
volume = (FAR struct nxffs_volume_s *)filep->f_inode->i_private;
|
||||
volume = filep->f_inode->i_private;
|
||||
DEBUGASSERT(volume != NULL);
|
||||
|
||||
/* Get exclusive access to the volume. Note that the volume lock
|
||||
|
||||
@@ -527,7 +527,7 @@ ssize_t nxffs_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
/* Recover the volume state from the open file */
|
||||
|
||||
volume = (FAR struct nxffs_volume_s *)filep->f_inode->i_private;
|
||||
volume = filep->f_inode->i_private;
|
||||
DEBUGASSERT(volume != NULL);
|
||||
|
||||
/* Get exclusive access to the volume. Note that the volume lock
|
||||
|
||||
Reference in New Issue
Block a user