diff mbox

[V9fs-developer] fs/9p: Remove cast from memory allocation

Message ID 1487745253-15411-1-git-send-email-me@tobin.cc (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Tobin Harding Feb. 22, 2017, 6:34 a.m. UTC
Coccinelle emits WARNING: casting value returned by memory allocation
function to (struct v9fs_inode *) is useless.

Remove unnecessary cast.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
 fs/9p/vfs_inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index f4f4450..462e9e4 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -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