Skip to contentSkip to conversation

9p:kzalloc() returns void pointer, no need to cast

PATCH In review Firo Yang 1 participant 1 message Apr 23, 2015

Subsystems (2)
lore
Share & tools
lore

Firo Yang

author
#0 lore raw

PATCH 9/15 9p:kzalloc() returns void pointer, no need to cast

kzalloc() returns a void pointer - no need to cast it in fs/9p/vfs_inode.c::v9fs_alloc_inode()

---
 fs/9p/vfs_inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/9p/vfs_inode.c +1 -2
index 3662f1d..b6ade6f 100644
@@ -238,8 +238,7 @@ v9fs_blank_wstat(struct p9_wstat *wstat)
 struct inode *v9fs_alloc_inode(struct super_block *sb)
 {
 	struct v9fs_inode *v9inode;
-	v9inode = (struct v9fs_inode *)kmem_cache_alloc(v9fs_inode_cache,
-							GFP_KERNEL);
+	v9inode = kmem_cache_alloc(v9fs_inode_cache, GFP_KERNEL);
 	if (!v9inode)
 		return NULL;
 #ifdef CONFIG_9P_FSCACHE
Signature · 1 line
2.1.0