@@ -551,7 +551,7 @@ static void v9fs_sysfs_cleanup(void)
static void v9fs_inode_init_once(void *foo)
{
- struct v9fs_inode *v9inode = (struct v9fs_inode *)foo;
+ struct v9fs_inode *v9inode = foo;
#ifdef CONFIG_9P_FSCACHE
v9inode->fscache = NULL;
#endif
@@ -261,7 +261,7 @@ static void adfs_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct adfs_inode_info *ei = (struct adfs_inode_info *) foo;
+ struct adfs_inode_info *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -121,7 +121,7 @@ static void affs_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct affs_inode_info *ei = (struct affs_inode_info *) foo;
+ struct affs_inode_info *ei = foo;
sema_init(&ei->i_link_lock, 1);
sema_init(&ei->i_ext_lock, 1);
@@ -299,7 +299,7 @@ static void befs_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct befs_inode_info *bi = (struct befs_inode_info *) foo;
+ struct befs_inode_info *bi = foo;
inode_init_once(&bi->vfs_inode);
}
@@ -747,7 +747,7 @@ static void bdev_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct bdev_inode *ei = (struct bdev_inode *) foo;
+ struct bdev_inode *ei = foo;
struct block_device *bdev = &ei->bdev;
memset(bdev, 0, sizeof(*bdev));
@@ -9520,7 +9520,7 @@ int btrfs_drop_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct btrfs_inode *ei = (struct btrfs_inode *) foo;
+ struct btrfs_inode *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -66,7 +66,7 @@ static void coda_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct coda_inode_info *ei = (struct coda_inode_info *) foo;
+ struct coda_inode_info *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -652,7 +652,7 @@ MODULE_ALIAS_FS("ecryptfs");
static void
inode_info_init_once(void *vptr)
{
- struct ecryptfs_inode_info *ei = (struct ecryptfs_inode_info *)vptr;
+ struct ecryptfs_inode_info *ei = vptr;
inode_init_once(&ei->vfs_inode);
}
@@ -86,7 +86,7 @@ static void efs_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct efs_inode_info *ei = (struct efs_inode_info *) foo;
+ struct efs_inode_info *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -204,7 +204,7 @@ static void ext2_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct ext2_inode_info *ei = (struct ext2_inode_info *) foo;
+ struct ext2_inode_info *ei = foo;
rwlock_init(&ei->i_meta_lock);
#ifdef CONFIG_EXT2_FS_XATTR
@@ -1025,7 +1025,7 @@ static void ext4_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
+ struct ext4_inode_info *ei = foo;
INIT_LIST_HEAD(&ei->i_orphan);
init_rwsem(&ei->xattr_sem);
@@ -363,7 +363,7 @@ void f2fs_msg(struct super_block *sb, const char *level, const char *fmt, ...)
static void init_once(void *foo)
{
- struct f2fs_inode_info *fi = (struct f2fs_inode_info *) foo;
+ struct f2fs_inode_info *fi = foo;
inode_init_once(&fi->vfs_inode);
}
@@ -37,7 +37,7 @@ static struct kmem_cache *fat_cache_cachep;
static void init_once(void *foo)
{
- struct fat_cache *cache = (struct fat_cache *)foo;
+ struct fat_cache *cache = foo;
INIT_LIST_HEAD(&cache->cache_list);
}
@@ -744,7 +744,7 @@ static void fat_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct msdos_inode_info *ei = (struct msdos_inode_info *)foo;
+ struct msdos_inode_info *ei = foo;
spin_lock_init(&ei->cache_lru_lock);
ei->nr_caches = 0;
@@ -252,7 +252,7 @@ static void hpfs_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct hpfs_inode_info *ei = (struct hpfs_inode_info *) foo;
+ struct hpfs_inode_info *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -971,7 +971,7 @@ static const struct address_space_operations hugetlbfs_aops = {
static void init_once(void *foo)
{
- struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo;
+ struct hugetlbfs_inode_info *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -376,7 +376,7 @@ EXPORT_SYMBOL(inode_init_once);
static void init_once(void *foo)
{
- struct inode *inode = (struct inode *) foo;
+ struct inode *inode = foo;
inode_init_once(inode);
}
@@ -954,7 +954,7 @@ MODULE_ALIAS_FS("jfs");
static void init_once(void *foo)
{
- struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo;
+ struct jfs_inode_info *jfs_ip = foo;
memset(jfs_ip, 0, sizeof(struct jfs_inode_info));
INIT_LIST_HEAD(&jfs_ip->anon_inode_list);
@@ -81,7 +81,7 @@ static void minix_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct minix_inode_info *ei = (struct minix_inode_info *) foo;
+ struct minix_inode_info *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -72,7 +72,7 @@ static void ncp_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct ncp_inode_info *ei = (struct ncp_inode_info *) foo;
+ struct ncp_inode_info *ei = foo;
mutex_init(&ei->open_mutex);
inode_init_once(&ei->vfs_inode);
@@ -1977,7 +1977,7 @@ static inline void nfs4_init_once(struct nfs_inode *nfsi)
static void init_once(void *foo)
{
- struct nfs_inode *nfsi = (struct nfs_inode *) foo;
+ struct nfs_inode *nfsi = foo;
inode_init_once(&nfsi->vfs_inode);
INIT_LIST_HEAD(&nfsi->open_files);
@@ -3047,7 +3047,7 @@ struct kmem_cache *ntfs_big_inode_cache;
/* Init once constructor for the inode slab cache. */
static void ntfs_big_inode_init_once(void *foo)
{
- ntfs_inode *ni = (ntfs_inode *)foo;
+ ntfs_inode *ni = foo;
inode_init_once(VFS_I(ni));
}
@@ -430,7 +430,7 @@ MODULE_ALIAS_FS("openpromfs");
static void op_inode_init_once(void *data)
{
- struct op_inode_info *oi = (struct op_inode_info *) data;
+ struct op_inode_info *oi = data;
inode_init_once(&oi->vfs_inode);
}
@@ -85,7 +85,7 @@ static void proc_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct proc_inode *ei = (struct proc_inode *) foo;
+ struct proc_inode *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -615,7 +615,7 @@ static void qnx6_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct qnx6_inode_info *ei = (struct qnx6_inode_info *) foo;
+ struct qnx6_inode_info *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -663,7 +663,7 @@ static void reiserfs_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct reiserfs_inode_info *ei = (struct reiserfs_inode_info *)foo;
+ struct reiserfs_inode_info *ei = foo;
INIT_LIST_HEAD(&ei->i_prealloc_list);
inode_init_once(&ei->vfs_inode);
@@ -325,7 +325,7 @@ static void sysv_destroy_inode(struct inode *inode)
static void init_once(void *p)
{
- struct sysv_inode_info *si = (struct sysv_inode_info *)p;
+ struct sysv_inode_info *si = p;
inode_init_once(&si->vfs_inode);
}
@@ -177,7 +177,7 @@ static void udf_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct udf_inode_info *ei = (struct udf_inode_info *)foo;
+ struct udf_inode_info *ei = foo;
ei->i_ext.i_data = NULL;
inode_init_once(&ei->vfs_inode);
@@ -1417,7 +1417,7 @@ static void ufs_destroy_inode(struct inode *inode)
static void init_once(void *foo)
{
- struct ufs_inode_info *ei = (struct ufs_inode_info *) foo;
+ struct ufs_inode_info *ei = foo;
inode_init_once(&ei->vfs_inode);
}
@@ -1775,7 +1775,7 @@ static const struct file_operations userfaultfd_fops = {
static void init_once_userfaultfd_ctx(void *mem)
{
- struct userfaultfd_ctx *ctx = (struct userfaultfd_ctx *) mem;
+ struct userfaultfd_ctx *ctx = mem;
init_waitqueue_head(&ctx->fault_pending_wqh);
init_waitqueue_head(&ctx->fault_wqh);
See Documentation/process/coding-style.rst: "Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language." This will stop copy/paste cascade warnings. Signed-off-by: Fabian Frederick <fabf@skynet.be> --- fs/9p/v9fs.c | 2 +- fs/adfs/super.c | 2 +- fs/affs/super.c | 2 +- fs/befs/linuxvfs.c | 2 +- fs/block_dev.c | 2 +- fs/btrfs/inode.c | 2 +- fs/coda/inode.c | 2 +- fs/ecryptfs/main.c | 2 +- fs/efs/super.c | 2 +- fs/ext2/super.c | 2 +- fs/ext4/super.c | 2 +- fs/f2fs/super.c | 2 +- fs/fat/cache.c | 2 +- fs/fat/inode.c | 2 +- fs/hpfs/super.c | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/inode.c | 2 +- fs/jfs/super.c | 2 +- fs/minix/inode.c | 2 +- fs/ncpfs/inode.c | 2 +- fs/nfs/inode.c | 2 +- fs/ntfs/super.c | 2 +- fs/openpromfs/inode.c | 2 +- fs/proc/inode.c | 2 +- fs/qnx6/inode.c | 2 +- fs/reiserfs/super.c | 2 +- fs/sysv/inode.c | 2 +- fs/udf/super.c | 2 +- fs/ufs/super.c | 2 +- fs/userfaultfd.c | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-)