Skip to contentSkip to conversation

nfs: Remove unneeded kmem_cache_alloc() return value casts in nfs

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 3/15 nfs: Remove unneeded kmem_cache_alloc() return value casts in nfs

Don't unnecessarily cast allocation return value in fs/nfs/inode.c::nfs_alloc_inode().

---
 fs/nfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/inode.c +1 -1
index d42dff6..fc47d55 100644
@@ -1819,7 +1819,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
 struct inode *nfs_alloc_inode(struct super_block *sb)
 {
 	struct nfs_inode *nfsi;
-	nfsi = (struct nfs_inode *)kmem_cache_alloc(nfs_inode_cachep, GFP_KERNEL);
+	nfsi = kmem_cache_alloc(nfs_inode_cachep, GFP_KERNEL);
 	if (!nfsi)
 		return NULL;
 	nfsi->flags = 0UL;
Signature · 1 line
2.1.0